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)

deezelpope 04-15-2008 08:53 AM

Quote:

Originally Posted by thincom2000 (Post 1191903)

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>

Quote:

Originally Posted by ESADCG (Post 1308299)
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.

Quote:

Originally Posted by ESADCG (Post 1490876)
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:


All times are GMT. The time now is 01:59 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.01106 seconds
  • Memory Usage 1,726KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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