vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   getting some errors (https://vborg.vbsupport.ru/showthread.php?t=61300)

AN-net 02-12-2004 12:41 AM

well i fixed my insert query, it turns out by sending it to gallery.php?do=insert didnt work because when the forum is submitted it wrote a new url called gallery.php?etc. without a do=insert; so basically that was the prob. i have 2 other questions, ive seen in hacks that people use like "type the forum ids you wish to exclude with commas inbetween each", how does that work, i can only thing of something equalling one thing. also the book i have for php doesnt explain how to order things or grab the last entry of sumthing. can someone explain that to me?

AN-net 02-13-2004 03:20 AM

can anyone help with the mentioned above?

AN-net 02-14-2004 02:59 PM

can someone explain to me why this doesnt work:
PHP Code:

if ($bbuserinfo[usergroupid]==6) { 
            eval(
'$submitgal .= "' fetch_template('gallery_subbutton') . '";');
        } 

and plz also explain what i posted 2 posts up

Dean C 02-14-2004 04:06 PM

PHP Code:

if ($bbuserinfo['usergroupid'] == 6)
{
            eval(
'$submitgal = "' fetch_template('gallery_subbutton') . '";');


That should work. If it doesn't something else is conflicting with it :)

AN-net 02-14-2004 05:21 PM

thanks dean:D

edit:
didnt work>_<

could it be because $submitgal is grabbing a template and then im using $submital in another template to call $submitgal's template?

AN-net 02-15-2004 02:16 AM

anyone know how i could grab the last image added to a gallery(kinda like vb's last post)? and i see in a lot of hacks people say user groupid's who can view: 6,5,4
i dont get how commas create multiple conditions
so is the hack in php basically
PHP Code:

if($whocanview==6,5,4){
blah blah


?

Dean C 02-15-2004 08:07 AM

PHP Code:

if(in_array($bbuserinfo['userid'], array(4,5,6)))
{
blahblah();



AN-net 02-15-2004 12:55 PM

cool thanks ill try it out and post if it works but i still dont get y the usergroup if statement wont work>_<
edit:
im confused, what do i use the blahblah(); thing for?

Dean C 02-15-2004 01:08 PM

It's called pseduo code - just put the code in there that you want based on the if condition :)

AN-net 02-15-2004 01:53 PM

hmm its giving me a parse error on line 33.
PHP Code:

31:        if(in_array($bbuserinfo['usergroupid'], array(4,5,6))) 
32:            { 
33:                submitbutton(eval('$submitgal .= "' fetch_template('gallery_subbutton') . '";');); 
34:        } 

edit:
also anyone know or have any good tutorials or suggestions on how to do pagination?


All times are GMT. The time now is 07:27 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.01155 seconds
  • Memory Usage 1,739KB
  • 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
  • (5)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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