vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - FA Latest News (https://vborg.vbsupport.ru/showthread.php?t=138805)

farooqaaa 02-07-2007 10:00 PM

FA Latest News
 
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:-
Quote:

$latest_news
And 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

Quote:

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

rmxs 02-08-2007 06:04 PM

Same 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:
Code:

<td class="tcat">Latest News</td>
Replace with:
Code:

<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:
Code:

  </tr>
  <tr>

Replace with:
Code:

  </tr>
<tbody id="collapseobj_latenews" style="$vbcollapse[collapseobj_latenews]">
  <tr>

Find:
Code:

</table>
Add above:
Code:

</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,


Quote:

Originally Posted by Atakan KOC (Post 1178130)


What does this mean Atakan KOC in your post this code :


farooqaaa 02-09-2007 10:04 AM

Quote:

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/attachmen...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!

rmxs 02-09-2007 07:50 PM

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

Quote:

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

Quote:

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 :)

rmxs 02-10-2007 02:15 PM

Quote:

Originally Posted by farooqaaa (Post 1179020)
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

Quote:

Originally Posted by rmxs (Post 1178656)
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:
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:
PHP 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}"

Replace with:
PHP Code:

<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

Quote:

Originally Posted by rmxs (Post 1179143)
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

Quote:

Originally Posted by Nathan2006 (Post 1182085)
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....9&postcount=24

MarcG 02-16-2007 08:40 AM

Quote:

Originally Posted by SidelineSports (Post 1180670)
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

Quote:

Originally Posted by MarcG (Post 1183737)
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?

Quote:

Error Line 289, column 41: document type does not allow element "tbody" here .
<tbody id="collapseobj_latenews" style="">
Quote:

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

Quote:

Originally Posted by valdet (Post 1188456)
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

Quote:

Originally Posted by Masiello (Post 1189669)
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

Quote:

Originally Posted by thincom2000 (Post 1190804)
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

Quote:

!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:
PHP Code:

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:
Code:

<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:
Code:

<if condition="$vboptions['enable_ltnews'] AND is_member_of($bbuserinfo, $ugroups_lt)">
Then find:
Code:

</if></if>
Replace with:
Code:

</if>

Masiello 03-01-2007 06:02 AM

Quote:

Originally Posted by thincom2000 (Post 1191903)
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 :)


All times are GMT. The time now is 05:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01651 seconds
  • Memory Usage 1,854KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_code_printable
  • (4)bbcode_php_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete