![]() |
Latest Active Threads on Forumhome
Hi - I'm using this in VB 3.8 :
http://www.vbulletin.com/forum/showt...s-on-Forumhome Code:
<script language="" type="text/javascript"> Thread title1 (Posted By: username1) Thread title2 (Posted By: username2) Thread title3 (Posted By: username3) and it works fine. but any idea how I would get it to display the forum name as well and have the forumname linkable as well?: Thread title3 (Posted By: username3) in Forum4 |
You can do it, but you need to create two plugins.
First, using hook external_query and code Code:
$hook_query_fields .= " , forum.title AS forumname "; Second, using hook external_complete and code Code:
if ($vbulletin->GPC['type'] == 'JS') Then you also need to edit the FORUMHOME template, find the code you added, and replace the line that starts with document.write with Code:
document.writeln("<img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"\" border=\"0\" /> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <span class=\"time\">($vbphrase[posted_by]: "+threads[x].poster+")</span> in <a href=\"forumdisplay.php?f="+forums[x].forumid+"\">"+forums[x].forumname+"</a><br />"); |
Do I need to create plugins if it is live and working fine as is?
|
Quote:
If someone else has an alternative, please post it. |
It wont break anything long term though will it?
like I say it is working fine as is on the forumhome. |
Well, it's true whenever you add a plugin it's possible that it will cause a problem someday when you upgrade, so you have to weigh that against how much you want the mod. In this case I don't think there's too much risk.
I'm more a programmer and I'm not familiar with all the mods that are available, so if you feel better installing a product, maybe there's something else out there that will do what you want. |
Sorry what I mean is it safe to jsut add the code from here:
http://www.vbulletin.com/forum/showt...s-on-Forumhome rather than needing to make a plugin first as it works fine. |
Oh...yeah, that only requires template edits so you don't need any plugins for that.
|
cool- any idea how I'd get
Thread title3 (Posted By: username3) in Forum4 rather than just Thread title3 (Posted By: username3) Code:
<script language="" type="text/javascript"> |
Sorry, you lost me now. Like I said, you can't do it without plugins.
I'm out - anyone else want to take a shot at this? |
All times are GMT. The time now is 11:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|