vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   stumped on yucky parse error (https://vborg.vbsupport.ru/showthread.php?t=155062)

Antivirus 08-12-2007 11:49 PM

stumped on yucky parse error
 
1 Attachment(s)
I have to call multiple instances of the postbit_attachmentthumbnail template from within the adminCP (crazy, i know)

I am calling it like this:

PHP Code:

while ($attachment $db->fetch_array($attachments))
{
    
// ... display each thumbnail
    
$thumbs .= "
        <a href=\"attachment.php?"
.$session['sessionurl']."attachmentid=".$attachment['attachmentid']."&amp;d=".$attachment['dateline']."\" target=\"_blank\">
        <img class=\"thumbnail\" 
            src=\"attachment.php?"
.$session['sessionurl']."attachmentid=".$attachment['attachmentid']."&amp;stc=1&amp;thumb=1&amp;d=".$attachment['thumbnail_dateline']."\" 
            border=\"0\" 
            alt=\"
            <phrase 
                1=\""
.$attachment['filename']."\" 
                2=\""
.$attachment['counter']."\" 
                3=\""
.$attachment['filesize']."\" 
                4=\""
.$attachment['attachmentid']."\"
            > 
                "
.$vbphrase['image_larger_version_x_y_z']."
            </phrase>
            \"
         />
        </a>
        &nbsp;"
.iif($show['br'], "<br /><br />")."
    "
;
}
print_description_row($thumbs06'''center'); 

however i'm not getting the results i need ( see attached "yucky.gif" )

It's something to do with closing the image tag i'm pretty sure. I've been on this for 3 hours now and starting to get brainfry or brainfart. :p

Eikinskjaldi 08-13-2007 12:14 AM

Here's a thought...close the img tag.

Here's another, do this with the template system, thats what it is there for.

Antivirus 08-13-2007 12:17 AM

Isn't the following bit in red closing the img tag"

</phrase>
\"
/>
</a>
&nbsp;".iif($show['br'], "<br /><br />")."

If i'm not mistaken the <phrase> things might be an issue as well, that seems to be some sort of javascript tag which creates the hover text in the alt tag. I don't however know where this is defined and am guessing it's not defined within the admincp.

I didn't think I could eval templates from within the adminCP. I've never seen that done before in any of jelsoft's admin scripts. (or am i just totally fried???)

Marco van Herwaarden 08-13-2007 06:22 AM

Admin scripts usualy do not use the template system (to avoid getting locked out of admincp if there is an error in templates!).

Look at the source of the output page to find your error.

Opserty 08-13-2007 08:52 AM

Don't forget <phrase> tags aren't standard HTML duh :p

Antivirus 08-13-2007 10:44 AM

Well I finally gave up on hving the phrase tags included, and once removed, I'm no longer getting the errors, so thanks for the help people :)

Opserty 08-13-2007 10:58 AM

Use the construct_phrase() function see if that works?

Antivirus 08-14-2007 03:31 AM

that function didn't work for me, i think because the <phrase> tag has something to do with javascript, which I am clueless about. Thanks for suggestion though :)

Adrian Schneider 08-14-2007 04:32 AM

<phrase> is not valid HTML ;)

BTW, since you aren't parsing values in your double quotes, switch to single! It will make it so much cleaner to read because you don't have to escape all the HTML attribute quotes.

Antivirus 08-20-2007 08:19 PM

oh, good point thanks Sir.


All times are GMT. The time now is 02:20 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.01075 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete