1
here's a modification that i made for the PHP-Nuke news system sometime last year (when i was active in that community as intel352).
i'd like to see something similar implemented in the XOOPS news module. it provides a Read More dropdown link that has the rest of the article, instead of being directed to another page.
× close edit hex TEXT viewer: /nukebbmods.net/dropdownNewsMod.txt
1 /********************************************/
2 /* Drop-Down News Modification for PHP-Nuke */
3 /* Created by intel352 of NukeBBMods.net */
4 /* http://www.nukebbmods.net */
5 /* intel352@nukebbmods.net */
6 /********************************************/
7
8 INSTALLATION FOR DROP-DOWN NEWS MOD:
9
10 Files Affected:
11 includes/my_header.php
12 includes/javascript.php
13 modules/News/index.php
14
15
16 1. open includes/my_header.php, anywhere above ?>, add:
17
18 echo "nn";
26
27
28 2. open includes/javascript.php, above ?>, add:
29
30 echo "nn";
39
40
41 3. open modules/News/index.php, around line 107 (inside 'function theindex'), search for:
42
43 if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
44 $morelink .= "$story_link"._READMORE." | ";
45 } else {
46 $morelink .= "";
47 }
48 if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE." | "; }
49
50 DELETE or COMMENT OUT that code
51
52 in the same function, find:
53
54 themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext,
$notes, $morelink, $topicname, $topicimage, $topictext);
55
56 and BEFORE it, add:
57
58 if($fullcount>0)
59 {
60 $words = split(' ', $bodytext);
61 $word_counts = count($words);
62 $readmore = "[ onclick="return hidetoggle('full$s_sid');"
onmouseover="window.status='Read More'; return true;" onmouseout="window.status=''; return true;">
Read More ($word_counts more words) ] style="display: none;">$bodytext
";
63 $hometext = $hometext."
".stripslashes($readmore);
64 }
65
66
67 SAVE and CLOSE all files
68
69 that's it, cheers!