Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
izone
Involved
Involved


Joined: Sep 07, 2004
Posts: 354
Location: Sweden

PostPosted: Fri Nov 11, 2005 3:53 am Reply with quote

In frontpage when you publish a news you can click on Read more... link to go to the news page. Is there any way to make the title of news as a link with the same function (linking to that news like Read more...) too?

How?

Best Regards.
 
View user's profile Send private message
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Fri Nov 11, 2005 5:34 am Reply with quote

cant you simple make that link active..like its with news,simply by copying..
 
View user's profile Send private message
izone
PostPosted: Fri Nov 11, 2005 8:08 am Reply with quote

hitwalker, thanks.

Could tell me little more? Copying what to where?
 
hitwalker
PostPosted: Fri Nov 11, 2005 8:11 am Reply with quote

well,i dont know your theme but there's your title defined.
So all you have to is i guess is to make your title an active link using the one from original news.
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Fri Nov 11, 2005 8:24 am Reply with quote

izone,

You would have to change the code that is in your specific theme.php file for function themeindex. For example, if your theme name was DeepBlue, you would edit the file:

rootnuke/themes/DeepBlue/theme.php

The title of the article is formatted somewhere within the function themeindex. I can't get more specific than that because each theme can be different in how it formats the news block.

Hope this helps point you in the right direction.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
hitwalker
PostPosted: Fri Nov 11, 2005 8:32 am Reply with quote

yeah something like that...thanks montego...somes its hard to explain thing.....lol
 
izone
PostPosted: Fri Nov 11, 2005 9:17 am Reply with quote

montego, Thank you very much. Now I can be more sure to where I have to make changes.

Thanks both of you!
 
izone
PostPosted: Fri Nov 11, 2005 2:00 pm Reply with quote

Ok, Now I have been on this for a few hour and couldn't get it works.

I'm testing it locally and my theme is iCGstation. In my theme.php I have these codes for themeindex:

Code:


/************************************************************/
/* Function themeindex()                                    */
/*                                                          */
/* This function format the stories on the Homepage         */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath;
    if ($notes != "") {
   $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
    } else {
   $notes = "";
    }
    if ("$aid" == "$informant") {
   $content = "$thetext$notes\n";
    } else {
   if($informant != "") {
       $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant\">$informant</a> ";
   } else {
       $content = "$anonymous ";
   }
   $content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
    }
    $posted = ""._POSTEDBY." ";
    $posted .= get_author($aid);
    $posted .= " "._ON." $time $timezone ($counter "._READS.")";
    $tmpl_file = "themes/iCGstation/story_home.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
}


but I couldn't find anywhere to change to add a link to title. Insted I find these codes in story_home.html:

Code:


<td class="tbtbot"><b></b><span class="gen"><font class="storytitle"><b>$title</b></font></span></td>


and I change these to this:
Code:


<td class="tbtbot"><b></b><span class="gen"><font class="storytitle"><a href="modules.php ?name=News&amp;file=article&amp;sid=$s_sid$r_options"><b>$title</b></a></font></span></td>


(I put a space between modules.php and ? here)

and it almost works. But when I click on title now it sends me to article.html. I guess I have some wrong code in there.
 
izone
PostPosted: Thu Nov 17, 2005 2:10 pm Reply with quote

Please!

Anybody knows which URL I have to put in this link to work????

Please!
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Nov 17, 2005 4:02 pm Reply with quote

Are $s_sid and $r_options defined?

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
montego
PostPosted: Thu Nov 17, 2005 6:31 pm Reply with quote

izone wrote:
But when I click on title now it sends me to article.html. I guess I have some wrong code in there.


I am not 100% certain, but it looks like you have GTNextgen installed? Try renaming your GT-News.php file in your GoogleTap directory to see if it works without being GT'd. If it does, then you may have an issue with your GT statements. If it doesn't, at least you'll be able to look at other News module links and see what it should be.
 
izone
PostPosted: Fri Nov 18, 2005 9:21 am Reply with quote

montego, thanks again.

Yes I have GT but not GTNextgen, my in/out codes are in header.php (I don't know what ver. of GT it is, do you? ) .

I give it a try and inform you here again.
 
montego
PostPosted: Fri Nov 18, 2005 10:00 am Reply with quote

[quote="izone(I don't know what ver. of GT it is, do you? )[/quote]

Unfortunately, I was not GT'd until NextGen, so not sure. However, I would think the same principles would apply and that you will have to find the news related search/replace statements and comment them out so you can see the full links again, and then find the right link structure. This is, of course, if you do not wish to dig through the news module code to find the links! Wink
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©