Author |
Message |
izone
Involved
Joined: Sep 07, 2004
Posts: 354
Location: Sweden
|
Posted:
Fri Nov 11, 2005 3:53 am |
|
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. |
|
|
|
|
hitwalker
Sells PC To Pay For Divorce
Joined:
Posts: 5661
|
Posted:
Fri Nov 11, 2005 5:34 am |
|
cant you simple make that link active..like its with news,simply by copying.. |
|
|
|
|
izone
|
Posted:
Fri Nov 11, 2005 8:08 am |
|
hitwalker, thanks.
Could tell me little more? Copying what to where? |
|
|
|
|
hitwalker
|
Posted:
Fri Nov 11, 2005 8:11 am |
|
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: 9457
Location: Arizona
|
Posted:
Fri Nov 11, 2005 8:24 am |
|
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! |
|
|
|
hitwalker
|
Posted:
Fri Nov 11, 2005 8:32 am |
|
yeah something like that...thanks montego...somes its hard to explain thing.....lol |
|
|
|
|
izone
|
Posted:
Fri Nov 11, 2005 9:17 am |
|
montego, Thank you very much. Now I can be more sure to where I have to make changes.
Thanks both of you! |
|
|
|
|
izone
|
Posted:
Fri Nov 11, 2005 2:00 pm |
|
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&op=userinfo&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&file=article&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
|
Posted:
Thu Nov 17, 2005 2:10 pm |
|
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
|
Posted:
Thu Nov 17, 2005 4:02 pm |
|
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! |
|
|
|
montego
|
Posted:
Thu Nov 17, 2005 6:31 pm |
|
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
|
Posted:
Fri Nov 18, 2005 9:21 am |
|
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
|
Posted:
Fri Nov 18, 2005 10:00 am |
|
[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! |
|
|
|
|
|