View Full Version : Forum Home Enhancements - FA Latest News
farooqaaa
02-07-2007, 10:00 PM
Hello,
***** This HACK is brought to you by Betlik.com *****
* Description:
Show latest news on FORUMHOME.
* Features:
- Whole Hack Enable/Disable
- Allow separate usergroups.
- Expand/Collapse Table
.....more features coming soon in next versions.
* How to install?
Download the version you like. Goto your VBulletin AdminCp > Plugins & Products > Add/Import Product and upload the XML you downloaded.
Now Open Template: "navbar", at the bottom add:-
$latest_newsAnd you are done :)
Version History:
1.0 - Initial release.
1.1 - New Feature: Collapse / Expand Table
1.2 - News title is now in a "thead" td.
***** Please click to Install if you like this hack *****
Thanks
RFViet
02-08-2007, 01:23 PM
Thanks, first installed :D
Glynn58
02-08-2007, 02:28 PM
installed and not showing the news details section, nothing under news title :confused:
projectego
02-08-2007, 02:37 PM
Awesome! Thank you very much. :)
farooqaaa
02-08-2007, 04:46 PM
installed and not showing the news details section, nothing under news title
Have you installed it correctly?
I checked it and its working fine.
SpeedyHire
02-08-2007, 05:28 PM
Cant see where to post the news to, yes can see the news title, but not to where to type the news?
seems somehting is amiss here
farooqaaa
02-08-2007, 06:19 PM
ohhhhhh!! sorry there was a problem with it!
A new,fresh,tested and FIXED version is just uploaded. Please download it and it will work.
OR if there were still problems let me know.
Thanks
Glynn58
02-08-2007, 07:03 PM
working great now , cheers :up:
SpeedyHire
02-08-2007, 08:06 PM
yup working a teat now:)
nice work bud
Hornstar
02-08-2007, 09:51 PM
Is the news box collapsible? if not maybe a feature request.
Thanks.
marcsmith73
02-08-2007, 10:05 PM
I like this hack. Simple, and effective.
Nathan2006
02-09-2007, 01:10 AM
Thank you Farooq
Like this a lot :)
Install
Oh just wanted to ask if there was anyway to customize the
background color of the box?
Thanks :)
thincom2000
02-09-2007, 04:58 AM
To make the box collapse ---
In template latest_news, find:
<td class="tcat">Latest News</td>
Replace with:
<td class="tcat"><a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('latenews')"><img id="collapseimg_latenews" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_latenews].gif" alt="" border="0" /></a>Latest News</td>
Find:
</tr>
<tr>
Replace with:
</tr>
<tbody id="collapseobj_latenews" style="$vbcollapse[collapseobj_latenews]">
<tr>
Find:
</table>
Add above:
</tbody>
Atakan KOC
02-09-2007, 06:16 AM
Thanks Installed...
https://vborg.vbsupport.ru/external/2007/02/22.jpg
maxicep
02-09-2007, 08:44 AM
reserved thanks,
Thanks Installed...
https://vborg.vbsupport.ru/external/2007/02/22.jpg
What does this mean Atakan KOC in your post this code :
https://vborg.vbsupport.ru/external/2007/02/22.jpg
farooqaaa
02-09-2007, 10:04 AM
Is the news box collapsible? if not maybe a feature request.
Thanks.
ok version 1.1 is released with "collapse / expand". :)
Enjoy!
farooqaaa
02-09-2007, 10:31 AM
1.2 Version released. Now the News Title will be in a "thead" td. See the new screenshot:
https://vborg.vbsupport.ru/attachment.php?attachmentid=60300&stc=1&d=1171024314
thincom2000
02-09-2007, 06:40 PM
Ah, yes. I was wondering about that. Didn't quite mind the bold text as a header and didn't really feel the need to add a thead on a box with only one short blurb in it... Still I'll install the update. Thanks!
if the usergoup its for example 25 doesnt appeard :(
I remove from template this code
<if condition="$bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{0} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{2} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{4} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{6} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{8} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{10}">
And now works with all usergroups byt i cannot restrict
Strainge error
farooqaaa
02-10-2007, 09:29 AM
if the usergoup its for example 25 doesnt appeard
I remove from template this code
<if condition="$bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{0} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{2} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{4} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{6} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{8} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{10}">
And now works with all usergroups byt i cannot restrict
Strainge error
Don't remove that code. Re-install the product, and don't edit that template (latest_news).
Hope that helps.
Thanks
farooqaaa
02-10-2007, 09:31 AM
Ah, yes. I was wondering about that. Didn't quite mind the bold text as a header and didn't really feel the need to add a thead on a box with only one short blurb in it... Still I'll install the update. Thanks!
If you don't want the THEAD to be there, install version 1.1 :)
Don't remove that code. Re-install the product, and don't edit that template (latest_news).
Hope that helps.
Thanks
if i dont remove this code your hack doesnt appeard to groups with 2 digits exapmle group 25,26,11,.....
thincom2000
02-10-2007, 02:44 PM
if the usergoup its for example 25 doesnt appeard :(
I remove from template this code
Considering this hack doesn't use bitfields for Usergroup Permissions, you should do the following.
Create a new plugin.
Product: Latest News
Hook Location: parse_templates
Title: Latest News Usergroup Perms
Execution Order: 5
Plugin PHP Code:
if ((THIS_SCRIPT == 'index') AND $vbulletin->options['enable_ltnews'])
{
$augs = explode(',', $vbulletin->options['ugroups_lt']);
$mgs = explode(',', $vbulletin->userinfo['membergroupids']);
if (is_array($augs))
{
foreach ($augs AS $aug)
{
if (is_array($mgs))
{
foreach ($mgs AS $mg)
{
$news_allow = (trim($aug) == $mg) ? true : $news_allow;
}
unset($mg, $mgs);
}
$news_allow = (trim($aug) == $vbulletin->userinfo['usergroupid']) ? true : $news_allow;
}
unset($aug);
}
unset($augs);
}
Then edit your template latest_news.
Find:
<if condition="$bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{0} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{2} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{4} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{6} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{8} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{10}">
Replace with:
<if condition="$news_allow">
Glynn58
02-10-2007, 02:44 PM
yep thats true, i have had to remove the code,
oops cross posted lol
SidelineSports
02-12-2007, 02:33 PM
Sorry for the foolish question all. I uploaded the XML file, and inserted the $latest_news at the bottom of the navbar template as instructed. I see nothing, get nothing. Is there something I'm missing? Do I need to 'turn on this feature'? Change any settings? I am very new at all of this. Any help would be appreciated.
Nathan2006
02-14-2007, 04:55 AM
if i dont remove this code your hack doesnt appeard to groups with 2 digits exapmle group 25,26,11,.....
Yeah I know what its doing:
Usergroup 11 would allow Usergroup 1 to view the news
Even if you added 11,12,2,4,5,6
Usergroup 1 would still be able to view it fully.
I tried the same thing by looking on my laptop and using my PC in the admincp.
As soon as I removed my usergroup 11 I could then view the news as a guest on my laptop.
So all 2 digit numbers are not working :(
Will there be any fix to this soon?
I really like this mod :)
thincom2000
02-14-2007, 04:56 AM
Will there be any fix to this soon?
I really like this mod :)
It seems you guys have ignored my previous post: https://vborg.vbsupport.ru/showpost.php?p=1179159&postcount=24
MarcG
02-16-2007, 08:40 AM
Sorry for the foolish question all. I uploaded the XML file, and inserted the $latest_news at the bottom of the navbar template as instructed. I see nothing, get nothing. Is there something I'm missing? Do I need to 'turn on this feature'? Change any settings? I am very new at all of this. Any help would be appreciated.
In your Admin CP...go to your "vBulletin Options" and scroll down down to "Latest News by Betlik.com"
dizzy100
02-18-2007, 08:37 AM
Doesn't seem to work for Mod ID numbers. I.e. i have a mod that is assigned to the mod group (7 i think) and cannot see the news. All other groups 1 - 6 including me the admin can however and i have checked and she's right, nothing shows. Any ideas ?
SidelineSports
02-18-2007, 08:57 PM
In your Admin CP...go to your "vBulletin Options" and scroll down down to "Latest News by Betlik.com"
Thanks for the help! Installed!
BozzaJos
02-22-2007, 10:16 AM
Looks like an awesome hack! Unfortunately, I'm using vb3.5 and can't import the product. Can you perhaps make something like this for 3.5 or is there already anything similar to this for 3.5?
Anyway, good job mate! Looks like a good hack...
thincom2000
02-22-2007, 11:42 AM
You should be able to edit the product in NotePad or something and change the Product Dependency from 3.6 to 3.5. Of course I didn't author the hack, but I don't think there should be any problems running it on 3.5, considering it doesn't really make use of anything that changed (such as the datastore).
Masiello
02-23-2007, 08:12 AM
Hello, from where I change the module title "Latest News" to my Own in forum home?
thx
Masiello
02-24-2007, 12:55 PM
Can anybody have making this hack W3C standard?
Error Line 289, column 41: document type does not allow element "tbody" here .
<tbody id="collapseobj_latenews" style="">
Error Line 298, column 4: end tag for "br" omitted, but OMITTAG NO was specified .
<br>
naturally the error line are reffer to my board.
SidelineSports
02-26-2007, 01:26 AM
Can anyone confirm that this great thing works for vb 3.6.4
Yes, it does for me with 3.6.4
thincom2000
02-26-2007, 01:44 AM
Can anybody have making this hack W3C standard?
naturally the error line are reffer to my board.
What DOCUMENT TYPE are you using on your board? By default you should not have a problem with the <tbody> tag.
<br> will be W3C compliant if changed to <br />
Masiello
02-26-2007, 06:47 AM
What DOCUMENT TYPE are you using on your board? By default you should not have a problem with the <tbody> tag.
<br> will be W3C compliant if changed to <br />
Hello, I'm using DOCTYPE by Default
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
are you sure you don't have that problem using the same default doctype with this product enabled?
The tbody are allowed but not where it is now if not in a table
thincom2000
02-27-2007, 01:44 PM
Perhaps you edited your template and messed up the table code, because I'm positive <tbody> is used properly.
On another note, I would recommend the author change the usergroup part of the code. It will make the template code a lot cleaner, easier for users to understand, and will work for membergroups as well. I made a suggestion like this earlier, but now this one is much simpler.
First, edit the plugin Templating Starting.
Replace the Plugin Code with:
if ((THIS_SCRIPT == 'index') AND $vbulletin->options['enable_ltnews'])
{
$ugroups_lt = explode(',', $vbulletin->options['ugroups_lt']);
eval('$latest_news = "' . fetch_template('latest_news') . '";');
}
Now edit the template latest_news. Find:
<if condition="$vboptions[enable_ltnews]"><if condition="$bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{0} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{2} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{4} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{6} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{8} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{10}">
Replace with:
<if condition="$vboptions['enable_ltnews'] AND is_member_of($bbuserinfo, $ugroups_lt)">
Then find:
</if></if>
Replace with:
</if>
Masiello
03-01-2007, 06:02 AM
Perhaps you edited your template and messed up the table code, because I'm positive <tbody> is used properly.
EDIT: Thanks! Yuor code have fixed too that issue :)
Masiello
03-01-2007, 06:27 AM
EDIT: Can it's possible any mod for writing more than only one notice?
Masiello
03-04-2007, 04:47 AM
Please can be fix this with collapse module, that is in original code cause w3c errors and warning but removing it is a only drastic solution.
Thanks in advance
deezelpope
03-08-2007, 09:04 PM
Thank you!! Very nice!!
dizzy100
03-16-2007, 08:10 AM
Doesn't seem to work for Mod ID numbers. I.e. i have a mod that is assigned to the mod group (7 i think) and cannot see the news. All other groups 1 - 6 including me the admin can however and i have checked and she's right, nothing shows. Any ideas ?
Is nobody else seeing this ?
thincom2000
03-17-2007, 07:15 AM
dizzy100, have you tried my modifications to this mod? Post #40 (https://vborg.vbsupport.ru/showpost.php?p=1191903&postcount=40).
momo2
03-17-2007, 08:09 AM
installed excellent job thanks so much..
________
Triumph Rocket III (http://www.cyclechaos.com/wiki/Triumph_Rocket_III)
dizzy100
03-17-2007, 08:19 AM
dizzy100, have you tried my modifications to this mod? Post #40 (https://vborg.vbsupport.ru/showpost.php?p=1191903&postcount=40).
Ah i missed that :) Excellent and thanks very much, this solved the issue.
I couldn't replace the
Then find:
</if></if> Replace with:
</if> However as vbulletin said one of the If conditions was open without a close (which it would be) so left that in place.
Works perfect. You have my many thanks.
dizzy100
03-17-2007, 08:23 AM
dizzy100, have you tried my modifications to this mod? Post #40 (https://vborg.vbsupport.ru/showpost.php?p=1191903&postcount=40).
Ah solved it, didn't notice you had combined the first conditional.
Many many many thanks :)
harlita
03-18-2007, 08:47 AM
Installed on 3.6.5 and it works great.
Looks really cool too. Thanks! *clicks installed*
Nice add-on, thank you!
Any chance to make this with javascript so that once user read it, he can click "X" to close it?
deezelpope
05-23-2007, 08:36 PM
<i>It is collapsible...that's what I usually do.</i>
NashChristian
07-20-2007, 03:33 AM
Hello.
Is there any way to have this show up on my forum HOME page only? Right now it is showing up on every page, and with the same content, it gets rather annoying on EVERY page. I know I can collapse it, but is there a way to just have it show up on the home? That would be much easier for me.
Thanks!
Great hack! (It's the first I've ever installed, and it actually worked the first time!)
NashChristian
07-20-2007, 04:06 AM
Oh boy I figured it out, all on my own!
My how mother would be proud!
Thanks! Very cool Hack!:D
NashChristian
07-20-2007, 04:39 AM
Ok, so I added the $latest_news line to my forum home template instead of the Navbar because I only wanted this on my home page. Only problem is that with the skin that I'm running, it was missing a shadow effect under the box, which all the other boxes on my page had. So I scanned the code and figured out which part was for the shadow effect. Please see the code below which I added into my forum home template:
$latest_news
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="70" align="left" valign="top"><img src="$stylevar[imgdir_misc]/bot_left.gif" alt=" " border="0" /></td>
<td width="100%" style="background-image:url($stylevar[imgdir_misc]/bot_back.gif)"></td>
<td width="70" align="right" valign="top"><img src="$stylevar[imgdir_misc]/bot_right.gif" alt=" " border="0" /></td>
</tr>
</table>
Everything works great with ONE SMALL EXCEPTION, there is a 1/4" gap between the bottom of the Latest News box, and the beginning of my shadow effect. It looks as though there is a <br> in there, yet I don't see any in the code.
You can reference my site to see what I mean: Click for Demo (http://nashvillechristian.com/forums/index.php).
It is most obvious by looking on the left side, where the Latest News box ends, it also is extremely visible if you collapse the Latest News box. I've got a 1/4" gap in there and I can't figure out how to get rid of it.
Can any of you awesome coders out there give this newbie a hand PLEASE???
Thanks a bunch!
NashChristian
07-22-2007, 05:26 PM
In the eternal words of Pink Floyd, "Is there anybody out there?"
NashChristian
07-24-2007, 02:14 PM
Nope. Nobody out there.
Is there still no way to fix this so that it works with double digit user groups?
It still seems to have that bug/issue, so that a large percentage of my viewers are missing the news message.
If anybody could respond to this...
Thanks!
ESADCG
08-02-2007, 06:38 PM
I have gone through this thread and none of the solutions seem to work well. Couldn't the author rewrite this to work with all usergroups instead of all these hacks to the hack? It is pretty much worthless without the additional usergroups.
periphrastic
09-28-2007, 09:08 PM
installed & thank you
ESADCG
04-15-2008, 01:54 AM
Helllllo!!! Still need those double digit usergroups! This dude hasn't been online in a year! Someone needs to rewrite this thing!
deezelpope
04-15-2008, 08:53 AM
On another note, I would recommend the author change the usergroup part of the code. It will make the template code a lot cleaner, easier for users to understand, and will work for membergroups as well. I made a suggestion like this earlier, but now this one is much simpler.
First, edit the plugin Templating Starting.
Replace the Plugin Code with:
if ((THIS_SCRIPT == 'index') AND $vbulletin->options['enable_ltnews'])
{
$ugroups_lt = explode(',', $vbulletin->options['ugroups_lt']);
eval('$latest_news = "' . fetch_template('latest_news') . '";');
}
Now edit the template latest_news. Find:
<if condition="$vboptions[enable_ltnews]"><if condition="$bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{0} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{2} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{4} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{6} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{8} OR $bbuserinfo[usergroupid]== $vboptions['ugroups_lt']{10}">
Replace with:
<if condition="$vboptions['enable_ltnews'] AND is_member_of($bbuserinfo, $ugroups_lt)">
Then find:
</if></if>
Replace with:
</if>
I have gone through this thread and none of the solutions seem to work well. Couldn't the author rewrite this to work with all usergroups instead of all these hacks to the hack? It is pretty much worthless without the additional usergroups.
Helllllo!!! Still need those double digit usergroups! This dude hasn't been online in a year! Someone needs to rewrite this thing!
Did you see this first post I quoted? It works to fix the issue.:up:
cbiweb
05-27-2008, 03:23 AM
I have two styles: Default and Test 1. Neither of them is a parent to the other, they are two separate styles.
Test 1 has the $latest_news variable in its navbar template.
Default does NOT have it, yet it shows the latest news module as if it did.
Why would that happen? :confused:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.