Skip to content
WJunction - Webmaster Forum

Latest Post Like WJ

Status
Not open for further replies.

kamrul

Experienced Member
726
2009
6
Plugin install---
Code:
http://hotfile.com/dl/21849478/862f62f/vbulletin-plugins.xml.html
add this code --FORUMHOME-->navbar--> below

Code:
<table cellpadding="0" cellspacing="0" width="100%">
<tr><td valign="top">
<!--{%SHOUTBOX%}-->
</td>
<if condition="$bbuserinfo['field6'] == 'Yes'"><else />
<td width="10">&nbsp;</td><td valign="top" width="300">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
    <td class="tcat" align="center">
        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_latestposts')"><img id="collapseimg_forumhome_latestposts" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_latestposts].gif" alt="" border="0" /></a>
        Latest Posts
    </td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_latestposts" style="$vbcollapse[collapseobj_forumhome_latestposts]">
    <tr>
        <td class="alt1" align="left" width="100%">
<div style="padding: 2px; margin-top: 3px; margin-left: 2px; width: 100%;">
<div style="border: 0pt none; height: 218px; width: 98%; overflow: auto;">
<div id="tabContent"></div>$latest_posts

</div>
</div>
</if>
<script type="text/javascript">
var tabVar=new ajaxtabs("tabs", "tabContent")
tabVar.setpersist(true)
tabVar.setselectedClassTarget("link") //"link" or "linkparent"
tabVar.init()
</script>





        
        </td>

    </tr>
</tbody>
</table></td></tr></table>
This is for infernoshot not others.
 
Last edited:

95 comments

Plugin Manager > Latests Posts > Edit that.

Replace your code with this:
$siteposts = $db->query_read("
SELECT thread.lastposter, thread.lastpost, thread.views, thread.open, thread.forumid, thread.replycount, thread.threadid, thread.pollid, thread.title, user.username, user.userid, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM thread as thread
LEFT JOIN user AS user ON (user.username = thread.lastposter) ORDER BY lastpost DESC LIMIT 0, 5");
while($latest = $db->fetch_array($siteposts))
{

$latest['title'] = str_replace($hidechar, " ", $latest['title']);

if (strlen($latest['title']) > 28)
{
$latest['title'] = substr($latest['title'], 0, 28) . '...';
}
else
{
$latest['title'] = $latest['title'];
}

$latest['title'] = htmlspecialchars($latest['title']);
$trans = array("&amp;" => "&");
$latest['title'] = strtr($latest['title'], $trans);
$latest['replycount'] = number_format($latest['replycount']);
$lastest[musername] = fetch_musername($latest);
$lastest[musername] = $db->escape_string($lastest['musername']);
$date = date("g:i a",$latest['lastpost']);

$latest_posts .= "
<div style='padding: 4px; border-bottom: 1px dashed blue;' >
<div style='font-size: 11px;'>&bull; <a href='showthread.php?t=$latest[threadid]' title='$latest[title]' style='font-size: 10px;'><b>$latest[title]</b></a></div>
<div style='padding-top: 1px; padding-bottom: 1px;'><a href='member.php?u=$latest[userid]' style='font-size: 9px;'>Posted by $latest[musername]</a></div>
<div style='padding-top: 1px; padding-bottom: 2px; font-size: 7pt;'>
<span style='float: right;'>at $date</span>
<span> <font color='#8A478F'><b>$latest[replycount] replies</b></font></span>
</div>

</div>";
}
$db->free_result($siteposts);

Change what I wrote in red to what matches your skin. ;)
 
agreed i will like to see how to make this refresh like it does here as well.. thanks to all for the edits so far
 
ya i figured it was the topstats mod... i gave up after messin up a few times trying to add that one to the template instead,i will try again sometime when i am more stoned and wont get frusterated so easily lol
 
Yes, it's Cyb Advanced Forum Statistics with some modifications..

I already implement it on my forum.. lol..
to much modification for that, and i forgot what source codes I changed..
but I remember that modification only changed on 2 cyb templates..

Screenshot Last Post likes WJ with Auto-refresh function and Reload button:
[slide]http://imgcentre.com/img/uploads/big/34c9c40009.gif[/slide]
 
looks great T... im n00b coder though,if someone can offer some help doing this please hit me up
 
http://www.wjunction.com/showpost.php?p=182356&postcount=21

That's what the plugin has. O.o
Just make a new plugin and paste that code.

DeLeTeD said there was an error with that one, so.. I'll post mine.

Here;

$siteposts = $db->query_read("
SELECT thread.lastposter, thread.lastpost, thread.views, thread.open, thread.forumid, thread.replycount, thread.threadid, thread.pollid, thread.title, user.username, user.userid, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM thread as thread
LEFT JOIN user AS user ON (user.username = thread.lastposter) WHERE forumid NOT IN (30, 3, 13, 15, 34, 16, 31, 81, 82, 17, 18, 19, 20, 22, 80, 79, 21, 69, 70, 71, 72, 73, 24, 25, 32, 85, 84, 86, 87) ORDER BY lastpost DESC LIMIT 0, 19");
while($latest = $db->fetch_array($siteposts))
{

$latest['title'] = str_replace($hidechar, " ", $latest['title']);

if (strlen($latest['title']) > 29)
{
$latest['title'] = substr($latest['title'], 0, 29) . '...';
}
else
{
$latest['title'] = $latest['title'];
}

$latest['title'] = htmlspecialchars($latest['title']);
$trans = array("&amp;" => "&");
$latest['title'] = strtr($latest['title'], $trans);
$latest['replycount'] = number_format($latest['replycount']);
$lastest[musername] = fetch_musername($latest);
$lastest[musername] = $db->escape_string($lastest['musername']);
$date = date("g:i a",$latest['lastpost']);
$div = '<div style="border-bottom: 1px dotted #5080a6; padding: 2px;">';
$enddiv = '</div>';
$ci = '<img src="http://warezsfx.com/images/iwv2/comment.png"; alt="" class="inlineimg">';

$latest_downloads .= "
$div
<div style='font-size: 11px;'><font color='#ce6262'>&bull;</font> <a href='showthread.php?t=$latest[threadid]' title='$latest[title]' style='font-size: 10px;'><b>$latest[title]</b></a></div>
<div style='padding-top: 1px; padding-bottom: 1px;'><a href='member.php?u=$latest[userid]' style='font-size: 9px;'>Posted by $latest[musername]</a></div>
<div style='padding-top: 1px; padding-bottom: 2px; font-size: 7pt;'>
<span>$ci <font color='#8A478F'><b>$latest[replycount] Comments</b></font></span>
$enddiv
</div>";
}
$db->free_result($siteposts);

Of course, edit this: $ci = '<img src="http://warezsfx.com/images/iwv2/comment.png"; alt="" class="inlineimg">'; to your image location.
 
The addon download link in 1st post is dead. Reupload plz. I really want that addon. Its nice.
 
Status
Not open for further replies.

About the author

kamrul
Experienced Member · Joined
726
Messages
6
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom