vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Latest Threads On Forum Home (https://vborg.vbsupport.ru/showthread.php?t=83230)

Chris M 06-15-2005 10:00 PM

Latest Threads On Forum Home
 
[high]Installation Instructions[/high]

Step 1: Upload the .xml file to the Product Manager
Step 2: Modify the [high]FORUMHOME[/high] template
Find:
HTML Code:

<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
        </tr>
</tbody>
</if>

Add below:
HTML Code:

<!-- latest threads -->
<if condition="$show['latestthreads']">
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_latestthreads')"><img id="collapseimg_forumhome_latestthreads" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_latestthreads].gif" alt="" border="0" /></a>
                        $vbphrase[latest_threads]
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_latestthreads" style="$vbcollapse[collapseobj_forumhome_latestthreads]">
        <tr>
                <td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_new.gif" alt="$vbphrase[latest_threads]" /></td>
                <td class="alt1"><div class="smallfont">$threadbits</div></td>
        </tr>
</tbody>
</if>
<!-- /latest threads -->

Step 3: Click [high]INSTALL[/high]:D

[high]Credits[/high]
NTLDR - For allowing me to port his vB3 hack of this

[high]Updates[/high]
Version 1.1.0: Simple update to make this work with vBulletin 3.5.0 Beta 2 - If you are installing for the first time, follow the installation instructions - If you are upgrading, please delete the previous plugin, and upload the new one - This new plugin also has the uncached template fix :)

Version 1.1.1: Simple update to fix a permissions bug - Wasn't showing on my board because I had already fixed it and forgot about it lol :) - To upgrade, simply replace the plugin with the one attached ;)

Version 1.1.2: Simple update to fix a permissions bug again:) - To upgrade, simply replace the plugin with the one attached ;)

Chris

Reverend 06-16-2005 06:38 PM

Getting error at top of page with this:

Warning: Invalid argument supplied for foreach() in /index.php(450) : eval()'d code on line 11

Chris M 06-16-2005 06:43 PM

Try changing:
PHP Code:

$forumcache 

to
PHP Code:

$vbulletin->forumcache 

Satan

Reverend 06-16-2005 06:47 PM

Quote:

Originally Posted by hellsatan
Try changing:
PHP Code:

$forumcache 

to
PHP Code:

$vbulletin->forumcache 

Satan

In the plugin or template ??

Chris M 06-16-2005 06:47 PM

The plugin...

Satan

Reverend 06-16-2005 06:49 PM

Quote:

Originally Posted by hellsatan
The plugin...

Satan

New error:

Parse error: parse error, unexpected ')' in /****************/index.php(450) : eval()'d code on line 46

Chris M 06-16-2005 07:02 PM

I'm not sure then - The original not an invalid arguement here... :ermm:

Satan

Reverend 06-16-2005 07:19 PM

Both errors relate to this line in index:

PHP Code:

($hook vBulletinHook::fetch_hook('forumhome_complete')) ? eval($hook) : false

???

Chris M 06-16-2005 07:24 PM

Yeh that is the code that calls the [high]forumhome_complete[/high] hooks...

For some reason your board is rejecting the foreach in the code :ermm:

What other plugins/hacks do you have installed that utilise the [high]forumhome_complete[/high] hook?

Satan

Reverend 06-16-2005 07:26 PM

The only other plugin i use is this one New Posts & Threads Since Last visit
and that uses forumhome_start

Chris M 06-16-2005 07:28 PM

Indeed - I do not believe that this is the cause of the clash...

Hrm - This is a puzzle - Hopefully Zero Tolerance will see this and shed some light :p

Satan

Reverend 06-16-2005 07:29 PM

The latest threads do still display fine though regardless of the error. :confused:


I've taken it off for the moment until a possible solution can be found.

Chris M 06-16-2005 07:32 PM

Quote:

Originally Posted by Reverend
The latest threads do still display fine though regardless of the error. :confused:

Would you mind turning the plugin on, so I can see for myself?:p

Satan

Reverend 06-16-2005 07:33 PM

Quote:

Originally Posted by hellsatan
Would you mind turning the plugin on, so I can see for myself?:p

Satan

Turned back on. http://www.techzonez.com/forums/

Chris M 06-16-2005 07:37 PM

Thanks...

A thought just occurred to me:

Add:
PHP Code:

unset($forum); 

before:
PHP Code:

$forumperms = array(); 

in the plugin code...

Satan

Reverend 06-16-2005 07:40 PM

Nope

Parse error: parse error, unexpected ')' in /****/index.php(450) : eval()'d code on line 47

Chris M 06-16-2005 07:46 PM

Yeh - I have found the problem :(

https://vborg.vbsupport.ru/showpost....6&postcount=14

If you view that post, Zero Tolerance explains about there being a bug in the vB Plugin System - Sadly, since this plugin also uses regular expressions, the plugin system is stripping the slashes from the code, causing errors -.-

The "unset($forum);" step may be required by some users, but the cause of the second error generated once the first is fixed is a vBulletin bug which the vB devs will have to fix :(

Sorry about that ... :ermm:

Satan

Reverend 06-16-2005 07:52 PM

OK.

Will disable it until the plugin system bug is fixed.

bing11 06-18-2005 12:22 AM

How can we do?

I very love this hack

Chris M 06-19-2005 09:44 PM

[high]Update[/high]
Version 1.1.0: Simple update to make this work with vBulletin 3.5.0 Beta 2 - If you are installing for the first time, follow the installation instructions in the first post - If you are upgrading, please delete the previous plugin, and upload the new one from the first post - The new plugin also has the uncached template fix :)

Satan

dreck 06-19-2005 09:55 PM

I got the same error with 'latest threads on forumhome 110.xml':
Code:

Warning: Invalid argument supplied for foreach() in /index.php(450) : eval()'d code on line 78
But the lastest threads appear to be fine.

*Edit* It also affects the size of the forum width?

This is on my '/testvb/index.php' forum.

Great hack if we can get rid of the error!

Thanks!

Marco van Herwaarden 06-20-2005 03:42 AM

@dreck

What is the PHP version you are using?

.Tim 06-20-2005 04:16 AM

I get this error (except it says line 4 instead of 11):

Quote:

Originally Posted by Reverend
Getting error at top of page with this:

Warning: Invalid argument supplied for foreach() in /index.php(450) : eval()'d code on line 11

and the latest threads show up just fine. So I do this to get rid of the error:

Quote:

Originally Posted by hellsatan
Try changing:
PHP Code:

$forumcache 

to
PHP Code:

$vbulletin->forumcache 

Satan

And the latest threads disappear. :(

dreck 06-20-2005 04:39 AM

Quote:

Originally Posted by MarcoH64
@dreck

What is the PHP version you are using?

PHP version 4.3.11

Thanks.

Chris M 06-20-2005 10:07 AM

Hrm - I still do not get this error on my board - I guess they haven't fixed the bug that strips the slashes...

It should not affect the size of the forum width - You might need to alter the template mod to reflect whatever custom forumhome width modifications you have made...

http://www.vbulletin.com/forum/bugs3...view&bugid=184

In this, Freddie Bingham suggests editing class_core.php to remove this bug, or disabling [high]magic_quotes_gpc[/high] in php.ini

As this will be a necessary alteration for all hacks and plugins that use regex, I suggest doing one of the two ;)

Satan

dreck 06-20-2005 05:16 PM

Quote:

Originally Posted by hellsatan
Hrm - I still do not get this error on my board - I guess they haven't fixed the bug that strips the slashes...

It should not affect the size of the forum width - You might need to alter the template mod to reflect whatever custom forumhome width modifications you have made...

http://www.vbulletin.com/forum/bugs3...view&bugid=184

In this, Freddie Bingham suggests editing class_core.php to remove this bug, or disabling [high]magic_quotes_gpc[/high] in php.ini

As this will be a necessary alteration for all hacks and plugins that use regex, I suggest doing one of the two ;)

Satan

O.. ic, I will try that. I guess their will be a fix for this in the next beta.

Thanks!

Reverend 06-20-2005 07:39 PM

Quote:

Originally Posted by dreck
*Edit* It also affects the size of the forum width?

Same here as well.

Reverend 06-20-2005 07:49 PM

Also, editing class_core.php as suggested by Freddie hasn't fixed the error

Warning: Invalid argument supplied for foreach() in /index.php(450) : eval()'d code on line 4

grundybin 06-21-2005 01:55 AM

Ok I have it working on BETA 2 without any errors but...
telewizor OLED
It shows threads that have had a recent reply... when the User doesnt have access to it (such as in an restricted forum admin section)

Chris M 06-21-2005 08:35 AM

Quote:

Originally Posted by grundybin
Ok I have it working on BETA 2 without any errors but...

It shows threads that have had a recent reply... when the User doesnt have access to it (such as in an restricted forum admin section)

Are you entirely sure?

I have tested this extensively myself and cannot reproduce this :ermm:

Satan

Chris M 06-21-2005 08:45 AM

Quote:

Originally Posted by dreck
O.. ic, I will try that. I guess their will be a fix for this in the next beta.

Thanks!

Apparently according to the Devs this has already been fixed, but evidently it has not... :ermm:

I guess the fix that Freddie gave for Beta 1 is no longer the problem...

Apparently however they "fixed" it it broke somewhere else...

About the table width - You might have to alter the HTML code a bit - It is almost a direct copy of the "forumhome events" HTML so there shouldn't be a problem...

Satan

Chris M 06-21-2005 10:00 AM

[high]Update[/high]
Version 1.1.1: Simple update to fix a permissions bug - Wasn't showing on my board because I had already fixed it and forgot about it lol :) - To upgrade, simply replace the plugin with the one attached in the first post ;)

Satan

bing11 06-22-2005 03:12 AM

Quote:

Originally Posted by hellsatan
[high]Update[/high]
Version 1.1.1: Simple update to fix a permissions bug - Wasn't showing on my board because I had already fixed it and forgot about it lol :) - To upgrade, simply replace the plugin with the one attached in the first post ;)

Satan

very good

thank you

bing11 06-22-2005 07:57 AM

How can hide some forums?

Chris M 06-22-2005 10:54 AM

Not tested, but should work ;)

In the plugin code, add:
PHP Code:

$limitfids = ,x,y,z

before:
PHP Code:

foreach($vbulletin->forumcache AS $forum) { 

Replace [high]x,y,z[/high] with the forumids you wish to exclude :)

Satan

bing11 06-23-2005 03:06 AM

Quote:

Originally Posted by hellsatan
Not tested, but should work ;)

In the plugin code, add:
PHP Code:

$limitfids = ,x,y,z

before:
PHP Code:

foreach($vbulletin->forumcache AS $forum) { 

Replace [high]x,y,z[/high] with the forumids you wish to exclude :)

Satan

thank you so much

How about just want to show 1 or 2 forms?

Chris M 06-23-2005 10:59 AM

Hrm...

You will need to alter the query this time :p

Again, not tested, but in the plugin code, find:
PHP Code:

AND forumid NOT IN (0$limitfids

add above:
PHP Code:

AND forumid IN ($showfids

Now find:
PHP Code:

    // ## HIDE FORUMS WITHOUT THE CANVIEW PERMISSION ##
    
if (!$forumperms["$forum[forumid]"] & $vbulletin->bf_ugp_forumpermissions['canview']) {
        
$limitfids .= ','.$forum['forumid'];
    } 

add below:
PHP Code:

$showfids x,y,z

Replace [high]x,y,z[/high] with the forumids you want users to be able to view :)

Satan

albarq 06-23-2005 11:46 AM

hellsatan, thank you for this plug-in

what about if i want these last topics appear in all my forum pages? not just in the form home?

thank you

Chris M 06-23-2005 11:52 AM

Hrm...

I suppose in theory you could change the "forumhome_complete" hook location to a "global_complete" location, and then edit something like the footer template to include the table and $threadbits variable...

Satan

albarq 06-23-2005 12:00 PM

i did something like this but i edit the navbit template ... that works just in form home...

then i tried to change from forumhome_complete to ... global_complete but i got an error :

Fatal error: Call to a member function on a non-object in /home/users/public_html/board/includes/functions.php(4118) : eval()'d code on line 22


All times are GMT. The time now is 05:57 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.01742 seconds
  • Memory Usage 1,859KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (17)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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