vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Integration with vBulletin - [ITECH] Inferno External Lite (https://vborg.vbsupport.ru/showthread.php?t=166791)

Warlord 02-11-2008 04:32 PM

The following modification was done for vBExternal Lite, I would've posted this in that thread, but it's locked and says to come to this one.
I'm running vBulletin 3.6.4

Okay, I tried to modify this so it would work with attachments but unfortunately I'm coming up short for some reason.

Here's what I did.

In vbExternal.php find:
PHP Code:

                                'threadid'     => $Thread['threadid'],
                                
'threadname'   => $Thread['title'],
                                
'postuserid'   => $Thread['postuserid'],
                                
'postusername' => $Thread['postusername'],
                                
'replies'      => vb_number_format($Thread['replycount']),
                                
'views'        => vb_number_format($Thread['views']),
                                
'lastposter'   => $Thread['lastposter'], 

And REPLACE with this:

PHP Code:


                                
'threadid'                      => $Thread['threadid'],
                                
'threadname'                    => $Thread['title'],
                                
'postuserid'                         => $Thread['postuserid'],
                                
'postusername'                    => $Thread['postusername'],
                                
'replies'                             => vb_number_format($Thread['replycount']),
                                
'views'                            => vb_number_format($Thread['views']),
                                
'lastposter'                        => $Thread['lastposter'],
                                
'attachments'                    => $show['attachments'],
                                
'cellpadding'                     => $stylevar[cellpadding],
                                
'thumbnailattachment'               => $show['thumbnailattachment'],
                                
'attachedthumbnails'                => $vbphrase[attached_thumbnails],
                                
'formspacer'                         => $stylevar[formspacer],
                                
'thumbnailattachment'                => $post[thumbnailattachments],
                                
'imageattachment'                  => $show['imageattachment'],
                                
'attachedimages'                 => $vbphrase[attached_images],
                                
'imageattachments'                => $post[imageattachments],
                                
'imageattachmentlink'             => $show['imageattachmentlink'],
                                
'imageattachmentlinks'               => $post[imageattachmentlinks],
                                
'otherattachment'                => $show['otherattachment'],
                                
'attachedfiles'                    => $vbphrase[attached_files],
                                
'otherattachments'                => $post[otherattachments],
                                
'moderateattachment'            => $show['moderatedattachment'],
                                
'attachmentspendingapproval'    => $vbphrase[attachments_pending_approval],
                                
'moderatedattachments'             => $post[moderatedattachments], 


Save and upload.

In NEWS.PHP (located in your root/vbExternal folder)

Find:

PHP Code:

{post

And BELOW it ADD:

Code:





                <!-- attachments -->
                <if condition="{attachments}">
                        <div style="padding:{cellpadding}px">
                       
                        <if condition="{thumbnailattachment}">
                                <fieldset class="fieldset">
                                        <legend>{attachedthumbnails}</legend>
                                        <div style="padding:{formspacer}px">
                                        {thumbnailattachments}
                                        </div>
                                </fieldset>
                        </if>
               
                        <if condition="{imageattachment}">
                                <fieldset class="fieldset">
                                        <legend>{attachedimages}</legend>
                                        <div style="padding:{formspacer}px">
                                        {imageattachments}
                                        </div>
                                </fieldset>
                        </if>
                       
                        <if condition="{imageattachmentlink}">
                                <fieldset class="fieldset">
                                        <legend>{attachedimages}</legend>
                                        <table cellpadding="0" cellspacing="{formspacer}" border="0">
                                        {imageattachmentlinks}
                                        </table>
                                        </fieldset>
                        </if>
                       
                        <if condition="{otherattachment}">
                                <fieldset class="fieldset">
                                        <legend>{attachedfiles}</legend>
                                        <table cellpadding="0" cellspacing="{formspacer}" border="0">
                                        {otherattachments}
                                        </table>
                                </fieldset>
                        </if>
                       
                        <if condition="{moderatedattachment}">
                                <fieldset class="fieldset">
                                        <legend>{attachmentspendingapproval}</legend>
                                        <table cellpadding="0" cellspacing="{formspacer}" border="0">
                                        {moderatedattachments}
                                        </table>
                                </fieldset>               
                        </if>
                       
                        </div>
                </if>
                <!-- / attachments -->

Save and upload.

Now theoretically I think this should've worked, but like I said, I'm running into a few speedbumps.

1. It doesn't seem to recognize the IF statements for some reason
2. The actual attachments don't show. (you can tell it's trying, but I think maye my variables in vbExternal.php aren't defined correctly maybe?)

Any coder here want to tell me where I went wrong?

Attached is a screen shot of the results I've gotten so far.

Warlord 02-11-2008 06:08 PM

Ok, I realized I added the variable definitions in the wrong block of code. (I was putting them in the Newest Threads block instead of the News block).

It's still not working correctly, but I think I'm getting closer.

To undo the changes I made in the above post and correct them to what I have now, you're just moving some code around:

In vbExternal.php find:

PHP Code:


                                
'attachments'                    => $show['attachments'],
                                
'cellpadding'                     => $stylevar[cellpadding],
                                
'thumbnailattachment'               => $show['thumbnailattachment'],
                                
'attachedthumbnails'                => $vbphrase[attached_thumbnails],
                                
'formspacer'                         => $stylevar[formspacer],
                                
'thumbnailattachment'                => $post[thumbnailattachments],
                                
'imageattachment'                  => $show['imageattachment'],
                                
'attachedimages'                 => $vbphrase[attached_images],
                                
'imageattachments'                => $post[imageattachments],
                                
'imageattachmentlink'             => $show['imageattachmentlink'],
                                
'imageattachmentlinks'               => $post[imageattachmentlinks],
                                
'otherattachment'                => $show['otherattachment'],
                                
'attachedfiles'                    => $vbphrase[attached_files],
                                
'otherattachments'                => $post[otherattachments],
                                
'moderateattachment'            => $show['moderatedattachment'],
                                
'attachmentspendingapproval'    => $vbphrase[attachments_pending_approval],
                                
'moderatedattachments'             => $post[moderatedattachments], 

And DELETE it.

Then find:

PHP Code:


        
while($News $db->fetch_array($NewestNews)){
        
$Data .= ParseTemplate($Template,
                            array(
                                
'threadid'     => $News['threadid'],
                                
'threadname'   => $News['title'],
                                
'postuserid'   => $News['postuserid'],
                                
'postusername' => $News['postusername'],
                                
'post'         => $bbcode_parser->parse(unhtmlspecialchars($News['pagetext']), $f),
                                
'comments'     => vb_number_format($News['replycount']), 


And UNDERNEATH that ADD:

PHP Code:

                                'attachments'                    => $show['attachments'],
                                
'cellpadding'                     => $stylevar[cellpadding],
                                
'thumbnailattachment'               => $show['thumbnailattachment'],
                                
'attachedthumbnails'                => $vbphrase[attached_thumbnails],
                                
'formspacer'                         => $stylevar[formspacer],
                                
'thumbnailattachment'                => $post[thumbnailattachments],
                                
'imageattachment'                  => $show['imageattachment'],
                                
'attachedimages'                 => $vbphrase[attached_images],
                                
'imageattachments'                => $post[imageattachments],
                                
'imageattachmentlink'             => $show['imageattachmentlink'],
                                
'imageattachmentlinks'               => $post[imageattachmentlinks],
                                
'otherattachment'                => $show['otherattachment'],
                                
'attachedfiles'                    => $vbphrase[attached_files],
                                
'otherattachments'                => $post[otherattachments],
                                
'moderateattachment'            => $show['moderatedattachment'],
                                
'attachmentspendingapproval'    => $vbphrase[attachments_pending_approval],
                                
'moderatedattachments'             => $post[moderatedattachments], 

This gets rid of some of the extras that were beingt output on the page to make it look like this. I'm still having problems though as you can see from the attached thumbnail. I'm kind of lost at this point I think, so any help anyone would like to offer would be much appreciated. Thanks.

Fraik 02-14-2008 01:33 PM

Quote:

Originally Posted by Fraik (Post 1439483)
I'm having an issue... trying to create a news block but when I type in the number of posts to display and save it resets again, so its displaying all the posts!

Edit: When just displaying threads the number limit works just fine, it just doesn't work for thread posts :(

Any help, please?

Kalochero 02-20-2008 07:53 AM

Same Problem here.

cddw.ltd 02-26-2008 05:54 PM

Anyone know where to add the "require_once" code in Joomla?

If I put it in index.php (root) it logs me out.
If I put it into the template header it makes the page blank!?

azn_romeo_4u 02-26-2008 08:02 PM

Holy crap you finally updated vbexternal.

*Bows down and cries in happiness*

pewp 02-28-2008 05:22 AM

The thread posts block is not parsing images. it just shows a clickable link when i use the [ img ] [ /img ] tags

enjoymarcus 03-08-2008 12:45 AM

Hi, great mod. I'm having trouble however, for some reason or another this script is pulling through more than just the block, and I'm finding title, html, head, and body tags appearing in my source, which is of course causing conflicts. How would I go about preventing said tags being pulled through? thanks.

Triky 03-19-2008 04:21 PM

I will try it.

MrToasty 03-21-2008 03:24 PM

Quote:

Originally Posted by Fraik (Post 1439483)
I'm having an issue... trying to create a news block but when I type in the number of posts to display and save it resets again, so its displaying all the posts!

Edit: When just displaying threads the number limit works just fine, it just doesn't work for thread posts :(

Same here...

My block has the following entered into the DB, any ideas which part of the string is the problem? Or is it the file doing the parsing where the issue is?

Code:

a:12:{s:11:"maxpthreads";s:1:"5";s:12:"maintainperm";s:1:"0";s:6:"bbcode";s:1:"1";s:6:"forums";a:1:{i:0;s:2:"31";}s:10:"filtertext";s:0:"";s:10:"filtertype";s:5:"title";s:7:"orderby";s:4:"date";s:8:"orderdir";s:4:"desc";s:5:"range";s:3:"all";s:8:"maxtitle";s:0:"";s:11:"maxusername";s:0:"";s:8:"maxposts";s:0:"";}


All times are GMT. The time now is 11:54 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.01762 seconds
  • Memory Usage 1,872KB
  • 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_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