it seems morelink creates the link, but there must be a way to code it differntly, since it pulls up all the other stuff that goes with $morelink
edit: i found this string: $story_link
but i think i need to add it to a couple other places to make it work properly?
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Wed Mar 26, 2003 2:09 pm
just so you don't think you've been ignored.
Would it not be easy to find the "Read More" link that appears and then just copy the link URL to the $title bit???
AI
vinc3nzo Sergeant
Joined: Feb 28, 2003
Posts: 77
Posted:
Wed Mar 26, 2003 2:12 pm
beucase that would only work for one specific story. besides, the read more link is all build into the $morelink code.
vinc3nzo Sergeant
Joined: Feb 28, 2003
Posts: 77
Posted:
Wed Mar 26, 2003 2:21 pm
so i'm pretty sure it has something to do with $story_link. int he news module, $story_link = the story URL, but how do i activate it in that section of the theme. i tried putting it after global as well, i just don't know.
vinc3nzo Sergeant
Joined: Feb 28, 2003
Posts: 77
Posted:
Fri Mar 28, 2003 2:07 pm
so noone has any other ideas that can help me
disgruntledtech Site Admin
Joined: Apr 14, 2003
Posts: 991
Location: Tulsa, OK
Posted:
Sat Apr 19, 2003 5:27 pm
GOT IT!
i figured out how to do exactly what you are asking
the best part is you can do it without modifying nuke(just the theme)
in your theme.php or header.html
find :
Code:
global $anonymous, $tipath;
(the first line of function themeindex)
change it to:
Code:
global $anonymous, $tipath, $user, $articlecomm, $acomm, $score, $ratings;
add in this code
Code:
//get sid to build links from - should work for up to 99999 stories
$sid0 = strpos($morelink, 'sid=');
$sid1 = substr($morelink, ($sid0+4), 5);
$sid2 = trim($sid1,"\">amp\&co");
$story_link="<a href=\"article.html$sid2\">";
//get comment count
if (strpos($morelink, ' comment')) {
$cc1 = strpos($morelink, ' comment');
$cc2 = substr($morelink, ($cc1-4), 4);
// look for "> in $cc2 and grab everything after that and dump it into cc3
$cc3 = strpos($cc2, "\">");
$cc4 = substr($cc2, ($cc3+2), 4);
// clean up cc4
$c_count = trim($cc4,"\x20com");
}
echo "<br><br><font class=\"content\">$morelink</font>\n";
echo "</td></tr></table></td><td width=\"55\" height=\"80\" echo "//get sid to build links from - should work for up to 99999 stories
$sid0 = strpos($morelink, 'sid=');
$sid1 = substr($morelink, ($sid0+4), 5);
$sid2 = trim($sid1,"\">amp\&co");
$story_link="<a href=\"article.html$sid2\">";
//get comment count - should work for up to 999 comments
if (strpos($morelink, ' comment')) {
$cc1 = strpos($morelink, ' comment');
$cc2 = substr($morelink, ($cc1-4), 4);
// look for "> in $cc2 and grab everything after that and dump it into cc3
$cc3 = strpos($cc2, "\">");
$cc4 = substr($cc2, ($cc3+2), 4);
// clean up cc4
$c_count = trim($cc4,"\x20com");
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