neralex
Site Admin

Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Apr 20, 2009 7:30 pm |
|
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&file=article&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&file=categories&op=newindex&catid='.$catid.'"><font class="storycat">'."$title1".'</font></a>: '."$title";
$morelink .= ' | <a href="modules.php?name=News&file=categories&op=newindex&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&file=article&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.
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!
 |
|
|
nuken
RavenNuke(tm) Development Team

Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Tue Apr 21, 2009 7:10 am |
|
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! |
|
nuken

|
Posted:
Tue Apr 21, 2009 9:16 am |
|
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) {
|
|
|
|