vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Need help with forumid array (https://vborg.vbsupport.ru/showthread.php?t=264498)

fxwoody 05-31-2011 11:28 AM

Need help with forumid array
 
Ok, totally stuck here!
I'm trying to get those darn thumbnail to work in specified forums with the option "required"
As far as it goes, it works fine in every specified forumid's from the list and the thumb is showing fine, tho, when i go into a forum that is not in that array list, the thread doesn't get posted because it's being automatically block for missing the "thumbnail" input!
It's not in that main list of forumids that thumbnails should be shown in !!!

Any ideas why the (in_array......) is not excluding these forums?

Here's the code from the mod for "New Thread - Show Text Box?" and it's use the Hook location "newthread_start"

Code:

else if ($vbulletin->options['thread_thumbnails_forum_list'] AND $vbulletin->options['thread_thumbnails_forum_list'] != "") {
                    $forumsallowed = explode(",", $vbulletin->options['thread_thumbnails_forum_list']);
                    if (in_array($foruminfo['forumid'], $forumsallowed))
                    {
                        if($vbulletin->options['thread_thumbnails_thumbnail_source'] == '0')
                        {
                            $show['thumbnailurl']= true;
                        }

I have tried replacing the $foruminfo with $GLOBAL.....same results
Badly need your inputs with this guys! I'm trying to fix some options from "Product Thread thumbnails" from Null that lots of members wants but with no good results with this option :(

Tks

kh99 05-31-2011 01:07 PM

The in_array part looks right. I think maybe the problem is with the newpost_process code. It seems to check for required thumbnails but doesn't check the list of forums.

fxwoody 06-01-2011 08:13 AM

I guess this is a lost cause :(
I'm really trying to find out the troubles of this mod but freaking stuck! Is there a global reference chart for the new vb4's variable etc etc??

I know i'ved seen a few changes that were made in V4 for some strings or so like this one i thing should be modified to accommodate the new version

Code:

if($dothumbnail)

should be replace by:

if ($_REQUEST['do'] == 'not sure what to write in here')

etc etc etc

There's a few options that i would like to add to this mod, like, in the posbit_quickreply, adding the edit box to change the thumbs but when i add the code for it in the template, it doesn't show anything as it doesn't seem to hook to the plugin's function.

Anyway, a lot could be done but i'm a freaking newb with this part :mad:

I'm not a coder but trying to understand how it should work.
If anyone could give me a hand i would appreciate a lot ;)

Cheers

Lynne 06-01-2011 01:14 PM

When you created the option "thread_thumbnails_forum_list", what datatype is it (it shoudl be free, I believe)?

fxwoody 06-01-2011 07:45 PM

yes it is Lynne. either yes or no.

What do you have in mind?
Do you think it could be related to this? As far as the rest goes, it works on every selected forum to show the thumbs, only when i go into a none selected one that it still ask for an image .

sad because NullP is not going to update this plugin and it's a good one :(

tks for helping out ;)

nitra1000 06-01-2011 11:33 PM

Try hardcoding the array see if it works then? Should narrow down the problem

fxwoody 06-03-2011 05:51 AM

Quote:

Originally Posted by nitra1000 (Post 2202528)
Try hardcoding the array see if it works then? Should narrow down the problem

Nitra, could you give me more info about this :erm:

Not the top of my class to code :o

tks

fxwoody 06-04-2011 11:47 AM

Ok never mind guys! tks for some help here, i found the problems :)

Thread close


All times are GMT. The time now is 02:17 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
  • Page Generation 0.01519 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete