Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1775

PostPosted: Mon Apr 20, 2009 7:30 pm Reply with quote

hey guys!

i want put the hyperlink behind the $morelink under the topic-pic or another pic-url. with a click on the pic to the news article. the same function, as with morelink. The function should be at the same time with morelink over the theme (storyhome).

i have found the $morelink in the function theindex (modules/News/index.php):

Code:
      $story_link = '<a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.$r_options.'">';

      $morelink = '(';
//RN0000646:BEGIN
      if ($fullcount > 0 || ($c_count > 0 && $articlecomm == 1 && $acomm == 0)) {
         $morelink .= "$story_link".'<b>'._READMORE.'</b></a> | ';
      } else {
         $morelink .= '';
      }
//RN0000646:END
      if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE.' | '; }
      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 ($catid != 0) {
         $row3 = $db->sql_fetchrow($db->sql_query('SELECT title FROM '.$prefix.'_stories_cat WHERE catid=\''.$catid.'\''));
         $title1 = stripslashes(check_html($row3['title'], 'nohtml'));
         $title = '<a href="modules.php?name=News&amp;file=categories&amp;op=newindex&amp;catid='.$catid.'"><font class="storycat">'."$title1".'</font></a>: '."$title";
         $morelink .= ' | <a href="modules.php?name=News&amp;file=categories&amp;op=newindex&amp;catid='.$catid.'">'."$title1".'</a>';
      }
      if ($score != 0) {
         $rated = substr($score / $ratings, 0, 4);
      } else {
         $rated = 0;
      }
      $morelink .= ' | '._SCORE." $rated";
      $morelink .= ')';
      $morelink = str_replace(' |  | ', ' | ', $morelink);
      $morelink = str_replace('( | ', '(', $morelink); //RN0000646


themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext);


how can i duplicate this function the $story_link and the $morelink with other names?

for example:
the same storyhome with a 2nd $morelink. the 2nd $morelink does not display a text, but a picture. with a click on this picture (topic image) to jump on the full article of the story.

----------------------

my first try:

i added before the $story_link:
Code:
      $news_link = '<a href="modules.php?name=News&amp;file=article&amp;sid='.$sid.$r_options.'">';

      $newslink = "$news_link".'<img src="$t_image" style="width:268px; height:90px; border:0" alt="#" /></a>';


and now i added the $newslink into the themeindex (News & Theme):
Code:
themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext, $newslink);


... but the $t_image is not indicated. Crying or Very sad
can the $t_image be not also a selected PIC-URL?

my next goal is it to also store a alternative PIC-URL with posting an article into the data base. this PIC-URL should be usable then like the $t_image.

is it possible with the holy news module?

sorry for my bad english and thx!

Wink
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Apr 21, 2009 7:10 am Reply with quote

OK... Let me see if I understand you. You want to use an image instead of the text (Read More...) that the news uses? If that is the case, you could change the ._READMORE. to an image link instead of a language call.

Also, where is $t_image defined at?

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
nuken







PostPosted: Tue Apr 21, 2009 9:16 am Reply with quote

also in the theme, you could do something like
Code:
$story_link$t_image</a>
after you put $t_image in the theme.php

Code:
function themeindex ($aid, $informant, $time, $title, $story_link, $t_image, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
 
neralex







PostPosted: Fri Apr 24, 2009 5:44 pm Reply with quote

thanks for your help!

the $t_image is selected in the theme.php. I had to only add $story_link in theme.php and it works.

Exclamation Exclamation
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©