You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 80 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - theme question [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
vinc3nzo
Sergeant
Sergeant


Joined: Feb 28, 2003
Posts: 77


PostPosted: Wed Mar 26, 2003 1:36 pm Reply with quoteBack to top

hey everyone.

what code would i add into my them to make the title of a story on the index page become the actual link to thefull story? i thought it might be
Code:

<a href=\"$morelink\"> $title </a>


but i don't think thats right, is it?

here's my site http://unclestupid.com its running 5.6

thanks!
Find all posts by vinc3nzoView user's profileSend private messageVisit poster's website
vinc3nzo
Sergeant
Sergeant


Joined: Feb 28, 2003
Posts: 77


PostPosted: Wed Mar 26, 2003 1:47 pm Reply with quoteBack to top

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?
Find all posts by vinc3nzoView user's profileSend private messageVisit poster's website
ArtificialIntel



Joined: Jan 31, 2004
Posts: -88


PostPosted: Wed Mar 26, 2003 2:09 pm Reply with quoteBack to top

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??? Wink

AI
Find all posts by ArtificialIntelView user's profileSend private message
vinc3nzo
Sergeant
Sergeant


Joined: Feb 28, 2003
Posts: 77


PostPosted: Wed Mar 26, 2003 2:12 pm Reply with quoteBack to top

beucase that would only work for one specific story. besides, the read more link is all build into the $morelink code.
Find all posts by vinc3nzoView user's profileSend private messageVisit poster's website
vinc3nzo
Sergeant
Sergeant


Joined: Feb 28, 2003
Posts: 77


PostPosted: Wed Mar 26, 2003 2:21 pm Reply with quoteBack to top

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.
Find all posts by vinc3nzoView user's profileSend private messageVisit poster's website
vinc3nzo
Sergeant
Sergeant


Joined: Feb 28, 2003
Posts: 77


PostPosted: Fri Mar 28, 2003 2:07 pm Reply with quoteBack to top

so noone has any other ideas that can help me Sad Sad Sad
Find all posts by vinc3nzoView user's profileSend private messageVisit poster's website
disgruntledtech
Site Admin
Site Admin


Joined: Apr 14, 2003
Posts: 991

Location: Tulsa, OK

PostPosted: Sat Apr 19, 2003 5:27 pm Reply with quoteBack to top

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");
}

   $morelink = "";
   if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
      $morelink .= "$story_link<b>"._READMORE."</b></a> | ";
   } else {
      $morelink .= "";
   }
   if ($articlecomm == 1 AND $acomm == 0) {
      if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
   }

   if ($score != 0) {
      $rated = substr($score / $ratings, 0, 4);
   } else {
      $rated = 0;
   }
   $morelink .= " | "._SCORE." $rated";

   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");

}

   $morelink = "";
   if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
      $morelink .= "$story_link<b>"._READMORE."</b></a> | ";
   } else {
      $morelink .= "";
   }
   if ($articlecomm == 1 AND $acomm == 0) {
      if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
   }

   if ($score != 0) {
      $rated = substr($score / $ratings, 0, 4);
   } else {
      $rated = 0;
   }
   $morelink .= " | "._SCORE." $rated";

   echo "<font class=\"content\">$morelink</font>\n";

<A HREF=\"modules.php?name=News&file=friend&op=FriendSend&sid=$sid2\" ALT=\"\">Send to a friend</a>

<A HREF=\"modules.php?name=News&file=print&sid=$sid2\" ALT=\"\">Printer Friendly Page</a>";

Find all posts by disgruntledtechView user's profileSend private messageSend e-mailVisit poster's website
disgruntledtech
Site Admin
Site Admin


Joined: Apr 14, 2003
Posts: 991

Location: Tulsa, OK

PostPosted: Sat Apr 19, 2003 5:32 pm Reply with quoteBack to top

oh yeah BTW, the links at the bottom are just a suggestion

heres what i did with it http://www.voicesinmyhead.net/(the theme should be the default for a while)

im willing to bet that there is a way to do this with a LOT less code but this works so i'll use it
Find all posts by disgruntledtechView user's profileSend private messageSend e-mailVisit poster's website
vinc3nzo
Sergeant
Sergeant


Joined: Feb 28, 2003
Posts: 77


PostPosted: Thu Apr 24, 2003 5:59 am Reply with quoteBack to top

im looking into this now... thanks for the code...
Find all posts by vinc3nzoView user's profileSend private messageVisit poster's website
Imago
Captain
Captain


Joined: Jan 17, 2003
Posts: 629

Location: Europe

PostPosted: Thu Apr 24, 2003 6:17 am Reply with quoteBack to top

The content of $morelink is defined in modules/News/index.php
Find all posts by ImagoView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.825 Seconds - 329 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::