Welcome to the [HSX] website!

Been Gaming since 2003

Community Driven Site

Gaming, Web Development, and Support

  

 
Main Menu
 
DFG
 Home
 Join our Clan
 [HSX] Roster
 BF3 Stats
 Forums
 News
 Downloads
 News Letter
 Video tutorials
 Supporters
 Uploads
 F.A.Q
· FAQ
· Docs
· Forums FAQ
 [HS] History
 PHP Nuke Tools
 WhoIS Lookup
 Site Map
 Write a Review
 Image Repo
 Logout
DFG
DFG DFG DFG

 
[HSX] Donations
 
DFG
Donation
This here is a combined total of what we need to keep us going each month.

0 %

Donate

End DateApr 01
Target$50.00
Below Target$50.00
CurrencyUSD

Donators This Month
DFG
DFG DFG DFG

 
 Search our Site
 
DFG DFG
DFG DFG DFG

 
Theme Management
 
DFG


DFG
DFG DFG DFG

 
Survey
 
DFG What is your favorite game to play ATM?

WarThunder
World of Tanks
H1Z1
MechWarrior Online
ARK
WarFace
SWTOR
BattleField serier
COD Series
Diablo
Armored Warfare



Results
Polls

Votes 749
Comments: 0
DFG
DFG DFG DFG

 
Honey Pot
 
DFG
Bots in the pot!
We have [1405] bots stopped!

DFG
DFG DFG DFG

     
DFG HeadShot Extreme :: View topic - Forum News Module


Search for at
HeadShot Extreme Advanced Search

Forum News Module
Post new topic   Reply to topic   printer-friendly view   Thank Post    HeadShot Extreme Forum Index -> Nuke Blocks / Modules Support
View previous topic :: View next topic  
Author Message
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:30 pm Post subject: No icon Forum News Module Reply with quote

Description: Display news from a selected forum on your homepage.

This was suppost to just get Thomas started on the idea, but I got carried away.

Features:
  • Displays almost all BBcodes.
  • Truncate the post to a number of characters any html tags that are cut off will be automatically added so its always 100% valid code.
  • Displays posted by and the time posted on.
  • Comment count is the number of replys.
  • Title and comments link to the forum thread.
  • Has its own pagination.
  • Set number of articles to show per page.
  • Social buttons uses thread titles and links to the thread. Can turn on and off.
  • Each article is in its own nuke table so it will match the theme. Cant see them very well in my screen grap becuase my nuke tables are just black boxes that are 80% transparent.
  • Displays the thread icon next to title if you use the module with this added. Evo only


Demo:
Please login to see this link
Get registered or Log in


Everyone is welcome to use/modify do what they like with it. the code is very well commented.

Read the config at the top of index.php to set it up. Set the module as the home module to replace your default news.

If you use this on your site please post a link so i can check out how it looks on different themes. I will help with any bugs you may encounter but because its free your be at the bottom of the list.

Version 2 (single forum)
Please login to see this link
Get registered or Log in


Version 3 (allows any topic from any forum)
Please login to see this link
Get registered or Log in


Mods:
(note: if you are using v2 youtube.be, usernamecolor, topic icon and evo image resize have already been added to the module.)
  • lytebox bbcode mod (Noto)
  • youtube.be mod (DreAdeDcoRpSE)
  • Replace HTML Newsletter News with News from the Forum_News module (Noto)
  • UsernameColor (OBTeo) or UsernameColor (Noto)
  • Resize images for Forum news module (Noto)
  • Stickynote / Float Left/Right bbcode (DreAdeDcoRpSE)
  • Large gap under 1st item fix. (Noto)





below are a list of all the mods from ClanThemes.
Mods will also be added to our downloads section soon, if you want the mods, you can PM me and I will send it to you.


Expand
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:33 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod #1 - Lytebox

#########################################################
He is the bbcode for lytebox.

Open evo_bbcode.php find:
Code:
$bbcode_tpl['img'] = "<img src=\"$1\" border=\"0\" alt=\"\" />";


After on a new line add:
Code:
$bbcode_tpl['lytebox'] = "<a href=\"$3\" rel=\"lytebox\"><img style=\"border:2px dotted;\" src=\"$3\" width=\"$1\" height=\"$2\" border=\"0\" alt=\"\" /></a>";


Find:
Code:
$replacements[] = $bbcode_tpl['img'];


After on a new line add:
Code:
$patterns[] = "#\[lytebox width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$bbcode_uid\](.*?)\[/lytebox:$bbcode_uid\]#si";
$replacements[] = $bbcode_tpl['lytebox'];


Save file and upload.


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:38 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod #2 - youtube.be

For those that use this module and have Evo, and implemented the Youtube update from here -
Please login to see this link
Get registered or Log in


that allows the new youtube.be link to show, then you will want to do the following. Thanks to SgtLegend for the update for the forums, but to update this module, you will do the same fix.

Open up the Root/modules/Forums_News/bbcode.php

Find:
Code:
      $patterns[] = "#\[youtube\]http://[A-Za-z0-9.]{2,5}.youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#si";
      $replacements[] = $bbcode_tpl['youtube'];


Replace with:
Code:
      $patterns[] = "#\[youtube\]http://[A-Za-z0-9.]{2,5}.youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
        $replacements[] = $bbcode_tpl['youtube'];
       $patterns[] = "#\[youtube\]http://youtu.be/([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
        $replacements[] = $bbcode_tpl['youtube'];


Save & Upload

Now with this, it will play both youtube.com and youtube.be links.


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
Sponsor
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:41 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod 3: HTML NewsLetter

##########################################################
Mod: Replace HTML Newsletter News with News from the Forum_News module.

This will replace the default News on the News letter with your forum news. So in the HTML Newsletter admin Latest News Items: will only show your news from your forum news not the default news module. The control for how many news items to show will still work.

Take backup of all files you edit.

Open modules\HTML_Newsletter\admin\admin_make_nls.php

Find:
Code:
/************************************************************************
* Build the Latest X News Items - to replace the {NEWS} tag
************************************************************************/  

And:
Code:
} //End IF for Latest X News Items


Replace all the code inbetween, including what you searched for with:
Code:
/************************************************************************
* Build the Latest X News Items - to replace the {NEWS} tag
************************************************************************/
 
if ( $_POST['msnl_news'] > 0 && $msnl_sTemplateNm != "notemplate" ) {

   $forum_id = 4;  // set to your news forum id, you can get your id by looking at its url modules.php?name=Forums&file=viewforum&f=4   ------ f=4 so 4 is the forum i am using.
   $i               = 0;
   $msnl_sRows   = "";

   $sql            = "SELECT "
                        ."t.`topic_id` AS topic_id, "
                        ."t.`forum_id` AS forum_id, "
                        ."`topic_last_post_id`, "
                        ."`topic_title`, "
                        ."`topic_views`, "
                        ."`topic_replies`, "
                        ."`post_time`, "
                        ."ut.`username` AS ut_username, "
                        ."ut.`user_id` AS ut_user_id, "
                        ."up.`username` AS up_username, "
                        ."up.`user_id` AS up_user_id "
                     ."FROM `"
                        .$prefix."_bbtopics` t, `"
                        .$prefix."_bbforums` f, `"
                        .$prefix."_bbposts` p, `"
                        .$prefix."_users` ut, `"
                        .$prefix."_users` up "
                     ."WHERE "
                        ."f.`forum_id` = t.`forum_id` "
                     ."AND "
                        ."`post_id` = `topic_last_post_id` "
                     ."AND "
                        ."ut.`user_id` = `topic_poster` "
                     ."AND "
                        ."up.`user_id` = `poster_id` ";

   if ( $msnl_iHideReadOnly == 1 ) {  //Exclude posts which should be hidden

      $sql .= "AND `auth_view` = '0' AND `auth_read` = '0' ";

   }

   $sql .= "AND `topic_moved_id` = '0' "
            . "AND f.`forum_id`=$forum_id ORDER BY `topic_id` DESC LIMIT 0, ". $_POST['msnl_news'];

   $result11   = msnl_fSQLCall( $sql );

   if ( !$result11 ) { //Bad SQL call

      msnl_fRaiseAppError( _MSNL_ADM_MAKE_ERR_DBGETPOSTS );   

   } else { //Successful SQL call

      while ( $row = $db->sql_fetchrow( $result11 ) ) {

         $msnl_iTopicID                     = intval( $row['topic_id'] );
         $msnl_iForumID                     = intval( $row['forum_id'] );
         $msnl_iPostID                        = intval( $row['topic_last_post_id'] );
         $msnl_sTopicTitle                  = stripslashes( $row['topic_title'] );
         $msnl_iTopicViews                  = intval( $row['topic_views'] );
         $msnl_iTopicReplies               = intval( $row['topic_replies'] );
         $msnl_sPostTime                     = msnl_fFormatDate( $msnl_asPHPBBCfg['default_dateformat'],
                                                         $row['post_time'], $msnl_asPHPBBCfg['board_timezone'] );
         $msnl_sTopicPosterNm            = stripslashes( $row['ut_username'] );
         $msnl_sTopicPosterID            = intval( $row['ut_user_id'] );
         $msnl_sLastPosterNm               = stripslashes( $row['up_username'] );
         $msnl_iLastPosterID               = intval( $row['up_user_id'] );

         $i         = ++$i; //Keep track of row number

         $msnl_sRowTmp = $latestnewsrow;

         $msnl_sRowTmp = str_replace( "{ROWNUMBER}",               $i,                            $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTOPICLASTPOSTID}",   $msnl_iPostID,             $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTOPICID}",               $msnl_iTopicID,          $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTOPICREPLIES}",         $msnl_iTopicReplies,   $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTOPICTITLE}",            $msnl_sTopicTitle,       $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTPUSERID}",               $msnl_iTopicPosterID,   $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTPUSERNAME}",            $msnl_sTopicPosterNm,   $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FVIEWS}",                  $msnl_iTopicViews,      $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FTIME}",                     $msnl_sPostTime,         $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FUSERID}",                  $msnl_iLastPosterID,   $msnl_sRowTmp );
         $msnl_sRowTmp = str_replace( "{FUSERNAME}",               $msnl_sLastPosterNm,   $msnl_sRowTmp );

         $msnl_sRows .= $msnl_sRowTmp;

      } //End While
      
      $msnl_sLatestNews = $latestnewstop . $msnl_sRows . $latestnewsend;
      
      $msnl_sLatestNews = str_replace( "{AMOUNT}",   $_POST['msnl_news'],   $msnl_sLatestNews );

   }  //End IF DB call successful

} else { //Will not be including Latest Forum Posts

   $msnl_sLatestNews = "";

} //End IF for Latest X News Items


Find:
Code:
$forum_id = 4;  // set to your news forum id, you can get your id by looking at its url modules.php?name=Forums&file=viewforum&f=4   ------ f=4 so 4 is the forum i am using.


Replace: Just like you did in the Forum_News module.
Code:
$forum_id = 4;
With your news forum id.

Open modules\HTML_Newsletter\templates\Plain_Jane\template.php

Find:
Code:
$latestnewstop = "
<div class=\"content\">
<div class=\"title\"><a href=\"{SITEURL}/modules.php?name=News\">Our {AMOUNT} latest news items.</a></div>
<table width=\"100%\" align=\"center\">
   <tr class=\"subtitle\">
      <td width=\"5%\">
      </td>
      <td>
         Title
      </td>
      <td width=\"15%\">
         Topic
      </td>
      <td width=\"15%\">
         Author
      </td>
   </tr>";

$latestnewsrow =
   "<tr class=\"row\">
      <td>
         <a href=\"{SITEURL}/modules.php?name=News&file=article&sid={NEWSID}&mode=&order=0&thold=0\">
            {ROWNUMBER}
         </a>
      </td>
      <td>
         <a href=\"{SITEURL}/modules.php?name=News&file=article&sid={NEWSID}&mode=&order=0&thold=0\">
            {TITLE} ({HITS} hits)
         </a>
      </td>
      <td>
         <a href=\"{SITEURL}/modules.php?name=News&new_topic={TOPICID}\">
            {TOPIC}
         </a>
      </td>
      <td>
         {AUTHOR}
      </td>
   </tr>";

$latestnewsend =
"</table>
</div>";


Replace with:
Code:
$latestnewstop .= "
<div class=\"content\">
<div class=\"title\"><a href=\"{SITEURL}\" title=\"Our latest news items\">Our {AMOUNT} latest news items.</a></div>
<table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" align=\"center\">
   <tr class=\"subtitle\">
      <td width=\"5%\">
      </td>
      <td>
         Topic
      </td>
      <td width=\"7%\">
         Comments
      </td>
      <td width=\"10%\">
         Author
      </td>
      <td width=\"7%\">
         Viewed
      </td>
      <td width=\"23%\">
         Latest Comment
      </td>
   </tr>";

$latestnewsrow =
"   <tr class=\"row\">
      <td>
         {ROWNUMBER}
      </td>
      <td>
         <a href=\"{SITEURL}/modules.php?name=Forums&file=viewtopic&t={FTOPICID}\">
            {FTOPICTITLE}
         </a>
      </td>
      <td>
         {FTOPICREPLIES}
      </td>
      <td>
         <a href=\"{SITEURL}/modules.php?name=Forums&file=profile&mode=viewprofile&u={FTPUSERID}\">
            {FTPUSERNAME}
         </a>
      </td>
      <td>
         {FVIEWS}
      </td>
      <td>
         {FTIME}
         <br>
         <a href=\"{SITEURL}/modules.php?name=Forums&file=profile&mode=viewprofile&u={FUSERID}\">
            {FUSERNAME}
         </a>
      </td>
   </tr>";

$latestnewsend =
"</table>
</div>";


Other templates will probably vary, styles ect.. Its up to you to modify other templates.

Mod Finished: Save and upload. I hope thats what your after Dread.


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:42 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod 4: UserName Color

#####################################################################

Yea he uses this module. Here you go was simple.

--------------------------------------------------------------------------------------------------------------
AUC (Advanced username colour) Extreme only mod.

Open: modules/Forum_News/index.php

Find:
Code:
<a href=\"modules.php?name=Your_Account&op=userinfo&username=".mysql_result($result2, 0, 'username')."\">".mysql_result($result2, 0, 'username')."</a>

Replace with:
Code:
<a href=\"modules.php?name=Your_Account&op=userinfo&username=".mysql_result($result2, 0, 'username')."\">".UsernameColor(mysql_result($result2, 0, 'username'))."</a>


Save upload done!
--------------------------------------------------------------------------------------------------------------
 
EDIT: i was adding the mods to the 1st post and noticed that OBTeo had already posted this. Vivi you tit, waste my time.  LMAO

Ive put all the mods in the 1st post so they are easy to find.


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:43 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod 5: Resize images

#######################################################################
Resize images for Forum news module. (Extreme only, Raven dont have this)

Open: includes/javascript.php
Find:
Code:
$name == 'News'

After add:
Code:
 || $name == 'Forum_News'

Full line will look something like this once edited.
Code:
    if((empty($name) || $name == 'News' || $name == 'Forum_News' || $name == 'Reviews' || $name == 'Stories Archive' || $name == 'Downloads' || $name == 'Web Links' || $name == 'Content') && !defined('IN_PHPBB')) {

Save and upload.

Open: modules/Forum_News/bbcode.php
Find: at the end of function parse_bbcode
Code:
                $hometext = str_replace("
", '<br>', $hometext);
                return $hometext;

Replace with:
Code:
                $hometext = str_replace("
", '<br>', $hometext);
                $hometext = evo_img_tag_to_resize($hometext);
                return $hometext;

Save and upload.

Done!


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
Sponsor
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:44 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod 6: Sticky Note

#######################################################################
 
While I am here on the site, I might as well post how to input the

Stickynote bbcode mod:
Please login to see this link
Get registered or Log in

&
Float Left/Right bbcode mod:
Please login to see this link
Get registered or Log in



Open modules/Forum_News/bbcode.php :

Find:
Code:
$bbcode_tpl['size_close'] = "</span>";


On new line, Add After:
Code:
//Float Left/Right edits
      $bbcode_tpl['fr_open'] = "<div class=\"floatr\">";
      $bbcode_tpl['fr_close'] = "</div>";
      $bbcode_tpl['fl_open'] = "<div class=\"floatl\">";
      $bbcode_tpl['fl_close'] = "</div>";
      //StickyNote edits
      $bbcode_tpl['sn_open'] = '<div class="rotate-1"><div class="postit"><font color="#000000">';
      $bbcode_tpl['sn_close'] = "</font></div></div>";




Find:
Code:
$hometext = str_replace("[/size:$bbcode_uid]", $bbcode_tpl['size_close'], $hometext);


On new line, Add After:
Code:
//Float Left/Right Edits      
         $hometext = str_replace("[fr:$bbcode_uid]", $bbcode_tpl['fr_open'], $hometext);
      $hometext = str_replace("[fl:$bbcode_uid]", $bbcode_tpl['fl_open'], $hometext);
      $hometext = str_replace("[/fr:$bbcode_uid]", $bbcode_tpl['fr_close'], $hometext);
      $hometext = str_replace("[/fl:$bbcode_uid]", $bbcode_tpl['fl_close'], $hometext);
      //StickyNote Edit
      $hometext = str_replace("[sn:$bbcode_uid]", $bbcode_tpl['sn_open'], $hometext);
      $hometext = str_replace("[/sn:$bbcode_uid]", $bbcode_tpl['sn_close'], $hometext);





If you not running one but running the other, just cancel out the 2 or 4 lines that fall after the line saying what edits, for example, I will use the first set of edits. If I am running the float mod but not the sticky note mod, my edits would look like this:

Code:
//Float Left/Right edits
      $bbcode_tpl['fr_open'] = "<div class=\"floatr\">";
      $bbcode_tpl['fr_close'] = "</div>";
      $bbcode_tpl['fl_open'] = "<div class=\"floatl\">";
      $bbcode_tpl['fl_close'] = "</div>";
      //StickyNote edits
      //$bbcode_tpl['sn_open'] = '<div class="rotate-1"><div class="postit"><font color="#000000">';
      //$bbcode_tpl['sn_close'] = "</font></div></div>";


All I did was add in a // before the lines I wanted to cancel out.

You will have to cancel out the edits in both sections of the file that you edit. Use a little thought, its not hard to understand or follow.

Enjoy...


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
[HSX]coRpSE

Top Dog
Top Dog
Nuke Dev / Coder
Nuke Dev / Coder



Clan Leader


This user has donated over $300 to the clan.


Offline
  



  • » Show Info «


Status: coRpSE is offline
PostPosted: Fri Apr 01, 2016 1:45 pm Post subject: No icon Re: Forum News Module Reply with quote

Mod 7: Large gap under 1st item

#######################################################################
You have a css conflict.

Add this to your themes style.css
Code:
.addthis_toolbox {
   height: 5px;
}


 
Back to top
View user's profile Send private message Visit poster's website
HeadShot Domain, Been in buisness for over 10 years...
Display posts from previous:
Post new topic  Reply to topic   printer-friendly view   Thank Post HeadShot Extreme Forum Index ->  Nuke Blocks / Modules Support All times are UTC - 7 Hours [DST enabled]
Page 1 of 1
 


 
Jump to:  
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 cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Evo Downloads v1.2.1 29 coRpSE 11857 Fri Jan 27, 2017 4:42 pm
coRpSE View latest post
No new posts Evo Downloads 1.2.1 2 pd35 546 Sun Apr 17, 2016 9:13 am
pd35 View latest post
No new posts Downloads V1.2.1 patched small issue 2 hp201 657 Sun Jan 10, 2016 1:18 am
hp201 View latest post
No new posts Advanced Downloads V1.2.1 5 BODYBAGS_UK 4273 Sun Jan 03, 2016 9:59 pm
coRpSE View latest post
No new posts Found a bug in your Downloads module. 5 Teo 1017 Mon May 18, 2015 1:59 am
Teo View latest post
 




Powered By: phpBB © 2001 - 2008 phpBB Group
SimpleBlack V2 By: killigan
© DarkForge Graphics 2008 - 2009 All Rights Reserved

Googlepage: GooglePullerPage
DFG
DFG DFG DFG
Forums ©
Copyright © HeadShotDomain 2016 By: coRpSE
SimpleBlack V2 By: Killigan
Powered By: Evolution-Xtreme