1
intel352
News Module modification
  • 2004/7/2 14:31

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


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 
/********************************************/
  
/* Drop-Down News Modification for PHP-Nuke */
  
/* Created by intel352 of NukeBBMods.net    */
  
/* http://www.nukebbmods.net                */
  
/* intel352@nukebbmods.net                  */
  
/********************************************/
  

  8 INSTALLATION 
FOR DROP-DOWN NEWS MOD:
  

 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.phpanywhere above ?>, add:
 17 
 18 echo "n";
 19 echo "n";
 25 echo "nn";
 26 
 27 
 28 2. open includes/javascript.php, above ?>, add:
 29 
 30 echo "n";
 31 echo "n";
 38 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!

Login

Who's Online

200 user(s) are online (93 user(s) are browsing Support Forums)


Members: 0


Guests: 200


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits