Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2004, 08:15 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default i need some help with my addon

im currently constructing an addon for vb2 and since there is no help me finish forum anymore i guess ill post here.

anyways i made an addon for showthread.php. well here we go:
this is the error i get:
Quote:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/anima22/public_html/community/showthread.php on line 485
line 485 is this:
PHP Code:
$qaasshow="The file:$qassg['filename'] what posted by $posts['postusername'].<br>To view this file go <a href='attachment.php?attachmentid=$qaasg[attachid]'>here</a><br><form action='qaasupdate.php' method='get'><input type='hidden' name='attachid' value='$qaasg[attachid]' size='10'><input type='radio' name='qaas' value='1'>Approve&nbsp;&nbsp;<input type='radio' name='qaas' value='2'>Disapprove&nbsp;&nbsp;<input type='radio' name='qaas' value='3'>Delete<br><input type='submit' value='Update Attachment'></form>"
and i attached the entire modification i made
Attached Files
File Type: txt qaas.txt (961 Bytes, 5 views)
Reply With Quote
  #2  
Old 01-18-2004, 08:19 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

as you are using an array within a string, you should remove the singlequotes of $qassg[filename] and so on
Reply With Quote
  #3  
Old 01-18-2004, 08:24 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O.o thanks

hmm nothing is showing up>_> i put $qaasshow in my postbit template and nothing is showing up
Reply With Quote
  #4  
Old 01-18-2004, 08:38 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok all the text thats susposed to show is not showing up, anyone know y?
Reply With Quote
  #5  
Old 01-18-2004, 09:47 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i updated my coding but nothing shows still, anyone got any ideas?

heres my code:
PHP Code:
$qaas$DB_site->query("SELECT attachment.attachmentid,attachment.filename AS filename,post.postid FROM attachment,post,thread WHERE attachment.visible=0 AND attachment.attachmentid=post.attachmentid AND post.threadid=thread.threadid");
while(
$qaasg=$DB_site->fetch_array($qaas))
{
    if(
$bbuserinfo[usergroupid]==6)
        {
            
$qaasshow="<td bgcolor='$post[backcolor]' colspan='2' align='left' valign='bottom'>The file:$qassg[filename] what posted by $posts[postusername].<br>To view this file go <a href='attachment.php?attachmentid=$qaasg[attachmentid]'>here</a><br><form action='qaasupdate.php' method='get'><input type='hidden' name='qaaspID' value='$qaasg[postid]'><input type='hidden' name='attachid' value='$qaasg[attachmentid]' size='10'><input type='radio' name='qaas' value='1'>Approve&nbsp;&nbsp;<input type='radio' name='qaas' value='2'>Disapprove&nbsp;&nbsp;<input type='radio' name='qaas' value='3'>Delete<br><input type='submit' value='Update Attachment'></form></td>";
        }
        else
            {
                
$qaasshow="";
            }

Reply With Quote
  #6  
Old 01-18-2004, 10:51 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i made some changes again, the over all script works but it still wont show its self on the post. i made the code that goes into the post into a template file. i will see how this works. anyways can someone give me some ideas how to solve this?

ok i moved the code from showthread.php to functions.php and it still doesnt show anything>_> only when i do print $qaasshow does it work
Reply With Quote
  #7  
Old 01-19-2004, 09:36 PM
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
Location: AnimationTalk.com
Posts: 2,367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know y it doesnt display my stuff in my template?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:34 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.04198 seconds
  • Memory Usage 2,248KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete