vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Display images in archive? (https://vborg.vbsupport.ru/showthread.php?t=271085)

v123shine 09-29-2011 03:08 AM

Display images in archive?
 
Hello..

Now all of images show as link in vbulletin archive. Can someone help me to show images in archive?

I see some of vbulletin forum can show image in archive. I try to search the mod but i cant find.

- Please help me -
Thank you so much

v123shine 09-30-2011 03:17 AM

Help me, please!!

v123shine 10-01-2011 06:01 PM

I need help, please!!

BirdOPrey5 10-02-2011 03:39 PM

Do you have a link to a forum that shows images in the archive?

v123shine 10-03-2011 02:34 AM

Thank you so much 'BirdOPrey5' for respone my question.

Yes of course I have.

BirdOPrey5 10-03-2011 10:09 AM

Wow that is very custom, at first I wasn't even sure it was a VB forum but it is. However it completely defeats the entire purpose of having an archive to begin with- why not just disable your archive if that is what you want?

v123shine 10-04-2011 04:34 AM

Dear BirdOPrey5,

I need the archive. Many people search in google and found the archive page / not original page, and they dont know how to open original page :( -- So i need to display image in archive, but in default vbulletin archive user can't view image/photo.

Can you help me to build the small plugin for display image in archive, please!

BirdOPrey5 10-04-2011 01:33 PM

I can't get it t work as a plugin, but if you edit your index.php file in the archive:

Find this code:

PHP Code:

    while ($post $db->fetch_array($posts))
    {
        
$i++;
        
$post['pagetext_simp'] = strip_bbcode($post['pagetext']);
        
$post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline']);
        
$post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);

        if (
$vbulletin->options['wordwrap'] != 0)
        {
            
$post['pagetext_simp'] = fetch_word_wrapped_string($post['pagetext_simp']);
        }

        
$post['pagetext_simp'] = fetch_censored_text($post['pagetext_simp']);

        (
$hook vBulletinHook::fetch_hook('archive_thread_post')) ? eval($hook) : false;
        
        
$output .= "\n<div class=\"post\"><div class=\"posttop\"><div class=\"username\">$post[username]</div><div class=\"date\">$post[postdate]$post[posttime]</div></div>";
        
$output .= "<div class=\"posttext\">" nl2br(htmlspecialchars_uni($post['pagetext_simp'])) . "</div></div><hr />\n\n";
    }




and replace with:

PHP Code:

    while ($post $db->fetch_array($posts))
    {
        
$i++;
        
$post['pagetext_simp'] = strip_bbcode($post['pagetext']);
        
$post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline']);
        
$post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);

        if (
$vbulletin->options['wordwrap'] != 0)
        {
            
$post['pagetext_simp'] = fetch_word_wrapped_string($post['pagetext_simp']);
        }

        
$post['pagetext_simp'] = fetch_censored_text($post['pagetext_simp']);

        (
$hook vBulletinHook::fetch_hook('archive_thread_post')) ? eval($hook) : false;

                require_once(
DIR '/includes/class_bbcode.php');
                   
$bbcode_parser =& new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),true); 

               
$post['pagetext_simp'] = $bbcode_parser->parse($post['pagetext'] , $threadinfo['forumid'] , false);

               
$output .= "\n<div class=\"post\"><div class=\"posttop\"><div class=\"username\">$post[username]</div><div class=\"date\">$post[postdate]$post[posttime]</div></div>";
        
$output .= "<div class=\"posttext\">" nl2br(($post['pagetext_simp'])) . "</div></div><hr />\n\n";
    }



It should parse your images, and other bbcode.

v123shine 10-04-2011 01:38 PM

Thank you so much BOP5

OC, I will try now :)

--------------- Added [DATE]1317743876[/DATE] at [TIME]1317743876[/TIME] ---------------

Dear BOP5,

unregister member (user not login) cant view the photo, but register member (user already login) can view the photo.

please help me to show image to unregister member...

--------------- Added [DATE]1317746246[/DATE] at [TIME]1317746246[/TIME] ---------------

Update:
All thread content empty in archive!

This is the preview vbulletin archive for member not login >>> all thread content empty, but if member login, member can view all thread content and images.

v123shine 10-06-2011 03:49 AM

Help me, please.

v123shine 10-07-2011 11:35 AM

I need your help, please!!

BirdOPrey5 10-07-2011 03:12 PM

Do you have images turned off for guests? In my forum I can see the images as a guest when I tested this.

Maybe check the file edits again.

v123shine 10-07-2011 04:59 PM

This for Guest :
https://vborg.vbsupport.ru/external/2011/10/55.jpg

This print screen for Register member :
https://vborg.vbsupport.ru/external/2011/10/56.jpg

Please help me BirdOPrey5

--------------- Added [DATE]1318010552[/DATE] at [TIME]1318010552[/TIME] ---------------

This is my index.php file content.

Code:


// ********************************************************************************************
// display thread

if ($do == 'thread')
{
        if (!$vbulletin->options['archive_threadtype'])
        {
                // if we are not using the archive threadtype, invisibly redirect to the full thread view
                exec_header_redirect($vbulletin->options['bburl'] . "/showthread.php?" . $vbulletin->session->vars['sessionurl_js'] . "t=$threadinfo[threadid]");
        }

        if ($vbulletin->options['wordwrap'] != 0)
        {
                $threadinfo['title'] = fetch_word_wrapped_string($threadinfo['title']);
        }

        $threadinfo['title'] = fetch_censored_text($threadinfo['title']);

        $output .= print_archive_navigation($foruminfo, $threadinfo);

        $output .= "<p class=\"largefont\">$vbphrase[view_full_version] : "
                . ($threadinfo['prefix_plain_html'] ? "$threadinfo[prefix_plain_html] " : '' )
                . "<a href=\"" . $vbulletin->options['bburl'] . "/showthread.php?t=$threadinfo[threadid]\">$threadinfo[title]</a></p>\n<hr />\n";

        if ($p == 0)
        {
                $p = 1;
        }

        $output .= print_archive_page_navigation($threadinfo['replycount'] + 1, $vbulletin->options['archive_postsperpage'], "t-$threadinfo[threadid]");

        $posts = $db->query_read_slave("
                SELECT post.postid, post.pagetext, IFNULL( user.username , post.username ) AS username, dateline
                FROM " . TABLE_PREFIX . "post AS post
                LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = post.userid)
                WHERE threadid = $threadinfo[threadid]
                        AND visible = 1
                        $globalignore
                ORDER BY dateline ASC
                LIMIT " . (($p - 1) * $vbulletin->options['archive_postsperpage']) . ',' . $vbulletin->options[archive_postsperpage]
        );
        if ($pda AND false)
        {
                $output .= "<span id=\"posting\"><a href=\"?message=1\" rel=\"nofollow\">New Reply</a></span>";
        }
        $i = 0;



        while ($post = $db->fetch_array($posts))
    {
        $i++;
        $post['pagetext_simp'] = strip_bbcode($post['pagetext']);
        $post['postdate'] = vbdate($vbulletin->options['dateformat'], $post['dateline']);
        $post['posttime'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);

        if ($vbulletin->options['wordwrap'] != 0)
        {
            $post['pagetext_simp'] = fetch_word_wrapped_string($post['pagetext_simp']);
        }

        $post['pagetext_simp'] = fetch_censored_text($post['pagetext_simp']);

        ($hook = vBulletinHook::fetch_hook('archive_thread_post')) ? eval($hook) : false;

                require_once(DIR . '/includes/class_bbcode.php');
                  $bbcode_parser =& new vB_BbCodeParser($GLOBALS['vbulletin'], fetch_tag_list(),true);

              $post['pagetext_simp'] = $bbcode_parser->parse($post['pagetext'] , $threadinfo['forumid'] , false);

              $output .= "\n<div class=\"post\"><div class=\"posttop\"><div class=\"username\">$post[username]</div><div class=\"date\">$post[postdate], $post[posttime]</div></div>";
        $output .= "<div class=\"posttext\">" . nl2br(($post['pagetext_simp'])) . "</div></div><hr />\n\n";
    }

}


v123shine 10-09-2011 02:13 AM

help me, please!!

BirdOPrey5 10-09-2011 09:24 AM

1st) You are not allowed to post entire files, it is a copyright violation. Only post the relevant part of the file.

2) Do not "QUOTE" it, if you post code use the [CODE] or [PHP] BB Code tags, not [QUOTE].

3) You did not answer my question asked in post #12, can guests view posts and images in your normal forum because that is the only reason I can think it isn't working.

You code changes look correct.

ALSO- if you have any plugins you made trying to do this, or any plugins on the hook "archive_thread_post" - disable them.

v123shine 10-09-2011 05:58 PM

1) You are not allowed to post entire files, it is a copyright violation. Only post the relevant part of the file.
# I'm so sorry for something stupid that I do. I promised not to repeat it again. Sorry!!

The problem come from plugin in "archive_thread_post", after disable that plugin, guest can view photo :):)
Thank you so much BirdOPrey5 for help me.

BirdOPrey5 10-09-2011 06:27 PM

Glad it is working...

You do not need to post everything in [code], only actual code. ;)


All times are GMT. The time now is 09:19 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.01185 seconds
  • Memory Usage 1,794KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)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