vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Display Enhancements - Logo Rotation (https://vborg.vbsupport.ru/showthread.php?t=252398)

Internetcafe 01-27-2011 10:35 AM

Anyone found something similar that will work on a fluid design !?

jimfries 01-27-2011 05:20 PM

Quote:

Originally Posted by Internetcafe (Post 2155210)
Anyone found something similar that will work on a fluid design !?

I've searched quite a bit, but have not found anything.

I can't even use this code, as it hides my log-in information, and my users are unable to log in to my forums.

zapiy 07-12-2012 08:09 PM

Anyway this could be used elsewhere in a theme?

thunderclap82 07-17-2012 06:08 PM

Quote:

Originally Posted by zapiy (Post 2347399)
Anyway this could be used elsewhere in a theme?

I don't see why not, though you'd have to modify the code a bit.

Liff 07-18-2012 07:51 AM

I really like the idea of this mod however when I complete stage three and activate the new plug-in it causes a 503 error when I refresh the forum.

My forum is running on 4.2.0 - Has anyone got any ideas on how they have updated this to suit?

All I need is a simple banner rotator that can use external tinypic links as the img src so this is perfect.

Please help :o)

thunderclap82 07-18-2012 01:38 PM

Quote:

Originally Posted by Liff (Post 2349199)
I really like the idea of this mod however when I complete stage three and activate the new plug-in it causes a 503 error when I refresh the forum.

My forum is running on 4.2.0 - Has anyone got any ideas on how they have updated this to suit?

I'm still running this mod and have 4.2 PL1. I think your problem is the hook location. At one point I had to change it due to a conflict. Try changing it to parse_templates and see what happens.

Liff 07-18-2012 01:51 PM

Quote:

Originally Posted by thunderclap82 (Post 2349256)
I'm still running this mod and have 4.2 PL1. I think your problem is the hook location. At one point I had to change it due to a conflict. Try changing it to parse_templates and see what happens.

Hey tc, thanks very much for your help.

Now it doesn't give me the error message however it simply doesn't show any banner.

I'm good at following instructions but not so good at being creative with coding - Is there anything else I should be doing differently?

thunderclap82 07-18-2012 02:10 PM

Is it breaking the design completely as in the page won't load at all, or is it just he banner itself? Do you have a link so I can see?

Liff 07-18-2012 02:37 PM

Quote:

Originally Posted by thunderclap82 (Post 2349261)
Is it breaking the design completely as in the page won't load at all, or is it just he banner itself? Do you have a link so I can see?

The page loads OK, just without the banner..

It's a lovely looking Mod, so I realy appreciate you bringing it to us as well as trying to work thought my issues :thumbup:

http://twistsnturns.net/forumdisplay.php?2-67

And select the Style: Child of TNT67

thunderclap82 07-18-2012 04:34 PM

Is the image a PNG? Nivo doesn't play nice with PNG so be sure to use JPG.

Liff 07-18-2012 04:39 PM

Quote:

Originally Posted by thunderclap82 (Post 2349294)
Is the image a PNG? Nivo doesn't play nice with PNG so be sure to use JPG.

Nope.. It's deffo a .jpg

http://i46.tinypic.com/14vnxp5.jpg

thunderclap82 07-18-2012 05:40 PM

Quote:

Originally Posted by Liff (Post 2349296)
Nope.. It's deffo a .jpg

http://i46.tinypic.com/14vnxp5.jpg

Can you use an image on your server instead? Maybe there is a problem with using tinypic.

LgsOfChampions 07-21-2012 08:37 PM

is this working for 4.2?

Liff 07-31-2012 01:17 PM

Quote:

Originally Posted by LgsOfChampions (Post 2350251)
is this working for 4.2?

I've spent hours trying and failed miserably.

I would really appreciate it if anyone who has nailed this for 4.2 would mind sharing their success :)

thunderclap82 07-31-2012 06:21 PM

While I don't really support the plug-in as I'm not a programmer by any means (had a lot of help from the community getting it working) I can say it does work with vB 4.2 PL1. That's what we run on our site and the plug-in works fine.

Liff 08-07-2012 01:29 PM

Quote:

Originally Posted by thunderclap82 (Post 2353111)
While I don't really support the plug-in as I'm not a programmer by any means (had a lot of help from the community getting it working) I can say it does work with vB 4.2 PL1. That's what we run on our site and the plug-in works fine.

Tc.. I really like the plugin and while I can't get it to work I appreciate your support.

I've just started again from the very beginning and I have the exact same problem.

The problem for me seems still to be in the plugin as it kills my forum with the 503 error.

Can you confirm the details of the hook location as I've tried the two you've suggested to no avail. Everything else seems fine and it just looks as though it's waiting on the details of the banner rotator in order to work. If you want to see choose the Rotator TNT67 style on my forum: twistsnturns.net and you'll see what I mean. When I get it working I will be using it where my normal banner is, and not in the header, but I'll sort that once it's working :)

Thanks again for your time,

Liffey

thunderclap82 08-07-2012 07:08 PM

I run two sites and those are the took hook locations that work for me. It's possible another plug-in is causing a conflict. Not sure but, again, not a programmer so... *shrugs*

Not sure what else to tell you. Sorry.

Have you tried this mod?

Liff 08-08-2012 07:49 AM

Quote:

Originally Posted by thunderclap82 (Post 2355325)
I run two sites and those are the took hook locations that work for me. It's possible another plug-in is causing a conflict. Not sure but, again, not a programmer so... *shrugs*

Not sure what else to tell you. Sorry.

Have you tried this mod?

Hey TC.. I know you're not a programmer but you have been a great help.

I'm kinda hoping someone else looking in might be able to explain what's going on.. I disabled a bunch of products I no longer use and got it working (Yay!) and then all of a sudden it stopped working in Chrome, but works fine in FF & Safari.

I've cleared my cache etc.., in Chrome but nothing...

Does anyone have any ideas as this is starting to drive me crazy :D

http://twistsnturns.net

Style: Slider TNT67

Liff 08-08-2012 08:08 AM

[Edit] I seem to be getting somewhere.. When I use the 'Parse_Templates' as hook location it works fine on the forum listing page, but not within the forum.

I understand TC might not be able to do this but is there any way to bypass the plug-in requirement of this modification in order to make it work regardless?

I do run a lot of mods on my forum and it's probable that one of them is clashing, but I'm very close to having this work and feel that just a little more and I'll be there :)

[Edit again] OK.. When I disable the parse_templates plug in modification for the Chiplove thumbnails it works fine.. The code for his is a little more complicated than the one for this modification and I would love to run both.. Does anyone have any ideas?

This is the code for the thumbnails hook in:

PHP Code:

#<?
if($vbulletin->options['chip_threadthumb_turn'] AND in_array(THIS_SCRIPT, array('forumdisplay', 'search')))
{
    function threadthumbnails_fetch_forums()
    {        
        global $vbulletin;
        list($w, $h) = explode(',', $vbulletin->options['chip_threadthumb_sizedefault']);        
        $lines = preg_split("#(\r\n|\r|\n)#", $vbulletin->options['chip_threadthumb_include']);
        if($vbulletin->options['chip_threadthumb_allforum'])
        {
            foreach( array_keys($vbulletin->forumcache) as $fid)
            {
                $vbulletin->forumcache[$fid]['thumb_w'] = $w;
                $vbulletin->forumcache[$fid]['thumb_h'] = $h;
            }
        }
        
        foreach($lines as $line)
        {
            list($fids, $w_h) = explode('|', $line);
            if($w_h)
            {
                list($w, $h) = array_map('intval', explode(',', $w_h));
            }
            $fids = array_map('intval', explode(',', $fids));
            foreach($fids as $fid)
            {
                if($vbulletin->forumcache[$fid])
                {
                    $vbulletin->forumcache[$fid]['thumb_w'] = $w;
                    $vbulletin->forumcache[$fid]['thumb_h'] = $h;
                }
            }
        }
        
        if ($exclude = explode(',', $vbulletin->options['chip_threadthumb_exclude']))
        {
            foreach($exclude as $fid)
            {
                if($vbulletin->forumcache[$fid]['thumb_w'])
                {
                    unset($vbulletin->forumcache[$fid]['thumb_w']);
                }
            }
        }    
        if ($exclude_groups = array_map('intval', explode(',', $vbulletin->options['chip_threadthumb_excludegroups'])))
        {
            if (in_array($vbulletin->userinfo['usergroupid'], $exclude_groups))
            {
                foreach( array_keys($vbulletin->forumcache) as $fid)
                {
                    unset($vbulletin->forumcache[$fid]['thumb_w']);
                }
            }
        }
    }
    function threadthumbnails_get_thumbnail($thread, $pagetext = '', $query = false)
    {
        global $vbulletin;        
        $thread['thumb'] = $pagetext ? $pagetext : $thread['pagetext'];
        $thread['thumb_src'] = '';
        
        $have_thumb = false;
        //using image of first post + youtube thumbnails
        if ( strpos($vbulletin->options['chip_threadthumb_types'], '1') !== false )
        {
            if (preg_match('#\[IMG\](.+?)\[\/IMG\]#i', $thread['thumb'], $m))
            {
                $thread['thumb_src'] = $m[1];    
                $have_thumb = true;
            }
            elseif (preg_match('#\[YOUTUBE\]([^\[]+?)\[\/YOUTUBE\]#i', $thread['thumb'], $m))    
            {
                $str = preg_replace('#(http.*watch\?v=)?([^"]+?)(&.*)?#', '$2', $m[1]);
                $thread['thumb_src'] = 'http://i4.ytimg.com/vi/'.$str.'/default.jpg';    
                $have_thumb = true;
            }
            elseif (preg_match('#\[video=youtube;([^\]]+?)\]#i', $thread['thumb'], $m)) 
            {
                $thread['thumb_src'] = 'http://i4.ytimg.com/vi/'.$m[1].'/default.jpg';    
                $have_thumb = true;
            }
        }
        //using file attach
        if ( 
            !$have_thumb // have not a thumbnails
            AND $thread['attach'] > 0 //have attach files
            AND (strpos($vbulletin->options['chip_threadthumb_types'], '2') !== false OR strpos($vbulletin->options['chip_threadthumb_types'], '3') !== false) )
        {
            //get attach file - image
            $attach = $vbulletin->db->query_first("
                SELECT attachment.attachmentid, attachment.dateline
                FROM ".TABLE_PREFIX."attachment AS attachment
                ".iif(strpos($vbulletin->options['chip_threadthumb_types'], '3') !== false, "
                    LEFT JOIN ".TABLE_PREFIX."filedata AS filedata ON (filedata.filedataid = attachment.filedataid)")."
                WHERE attachment.contentid = ".$thread['firstpostid']."
                    ".iif(strpos($vbulletin->options['chip_threadthumb_types'], '3') !== false, "AND filedata.extension IN ('png', 'jpg', 'jpeg', 'gif', 'bmp')")."
                LIMIT 1
            ");
            if($attach)
            {
                $thread['thumb_src'] = $vbulletin->options['bburl'].'/attachment.php?attachmentid='.$attach['attachmentid'].'&thumb=1&d='.$attach['dateline'];    
                $have_thumb = true;
            }
        }
        if($query AND !$have_thumb)
        {
            $post = $vbulletin->db->query_first("
                SELECT pagetext FROM ".TABLE_PREFIX."post WHERE threadid = $thread[threadid] AND parentid = 0 
            ");
            return threadthumbnails_get_thumbnail($thread, $post['pagetext']);
        }

        if(!$have_thumb AND $vbulletin->options['chip_threadthumb_useavatar'] AND ($thread['useavatar'] OR THIS_SCRIPT == 'search')) 
        {
            if(THIS_SCRIPT == 'search')
            {
                $useavatar = $vbulletin->db->query_first("
                    SELECT userid FROM ".TABLE_PREFIX."customavatar WHERE userid = ".$thread['postuserid']."
                ");
            }    
            if($useavatar OR $thread['useavatar'])
            {
                return $vbulletin->options['bburl'].'/image.php?' . $vbulletin->session->vars['sessionurl'] . "u=$thread[postuserid]";
            }
        }
        if (!$have_thumb)
        {
            $thread['thumb_src'] = vB_Template_Runtime::fetchStylevar("imgdir_misc").'/'.$vbulletin->options['chip_threadthumb_noimg'];    
        }
        return $thread['thumb_src'];
    }
    
    threadthumbnails_fetch_forums();
    
    
    if ($vbulletin->forumcache[intval($GLOBALS['forumid'])]['thumb_w'] > 0 OR THIS_SCRIPT == 'search')
    {        
        $template_name = iif(THIS_SCRIPT == 'search', 'search_').'threadbit';
        if($vbulletin->options['chip_threadthumb_zoom'])
        {        
            list($zoom_w, $zoom_h) = array_map('intval', explode(',', $vbulletin->options['chip_threadthumb_zoom_wh']));

        //add css
        $template_hook['headinclude_bottom_css'] .= '
<style type="text/css">
/* Chiplove.9xpro - Thread Thumbnails 2.2 */
#preview{position:absolute;border:1px solid #ccc;background:#333;padding:5px;display:none;color:#fff;}
</style>';

$jquery_lib = '';
if($vbulletin->options['chip_threadthumb_jquerypath'])
{
    if(substr($vbulletin->options['chip_threadthumb_jquerypath'], 0, 4) != 'http')
    {
        $jquery_lib = $vbulletin->options['bburl'].'/clientscript/jquery/'.$vbulletin->options['chip_threadthumb_jquerypath'];
    }
    else
    {
        $jquery_lib =& $vbulletin->options['chip_threadthumb_jquerypath']; 
    }
}

$template_hook['footer_javascript'] .= ($jquery_lib ? '<script type="text/javascript" src="'.$jquery_lib.'"></script>' : '').'
<script type="text/javascript">
/* Chiplove.9xpro - Thread Thumbnails 2.2 */
function imagePreview(){    
    xOffset = 30;
    yOffset = 30;
    jQuery("img.preview").hover(function(e){
        this.t = this.title;
        this.title = "";    
        var c = (this.t != "") ? "<br/>" + this.t : "";
        jQuery("body").append("<p id=\'preview\'><img src=\'"+ this.src +"\' style=\''.iif($zoom_w,"width:{$zoom_w}px;").iif($zoom_h,"width:{$zoom_h}px;").'\' alt=\'Image Preview\' />"+ c +"</p>");                                 
        jQuery("#preview")
            .css("top",(e.pageY - xOffset) + "px")
            .css("left",(e.pageX + yOffset) + "px")
            .fadeIn("fast");                        
    },
    function(){
        this.title = this.t;    
        jQuery("#preview").remove();
    });    
    jQuery("img.preview").mousemove(function(e){
        jQuery("#preview")
            .css("top",(e.pageY - xOffset) + "px")
            .css("left",(e.pageX + yOffset) + "px");
    });            
};
function removeTitle() {
    jQuery(".threadinfo").attr("title", "");
    jQuery(".threadstatus").attr("title", "");
    '.iif(THIS_SCRIPT == 'search', 'var items = jQuery("#searchbits").find(".threadbit");
    jQuery.each(items, function(k, v){
        if(typeof jQuery(items[k]).find("img.preview").attr("src") != "undefined") {
            jQuery(items[k]).find(".threadstatus").attr("title","");
            jQuery(items[k]).find(".threadinfo").attr("title","");
            jQuery(items[k]).find(".threadinfo").attr("title","");
            jQuery(items[k]).attr("title","");
        }
    });').'
}
jQuery(function(){
    imagePreview();
    setTimeout("removeTitle();", 1000);
});
</script>
';        
            $vbulletin->templatecache[$template_name] = str_replace(
                '<a class="title', 
                '<a title="\'.$thread[\'preview\'].\'" class="title', 
                $vbulletin->templatecache[$template_name]
            );
        }

        $vbulletin->templatecache[$template_name] = str_replace(
            '$final_rendered .= \'\' . \'></a>',
            '$final_rendered .= \'\' . iif($thread[\'thumb_src\'], \' style="height:\'.($vbulletin->forumcache[$thread[\'forumid\']][\'thumb_h\']+8).\'px !important;width:\'.($vbulletin->forumcache[$thread[\'forumid\']][\'thumb_w\']+10).\'px !important;'.$vbulletin->options['chip_threadthumb_cssforthumbnails'].iif(
            $vbulletin->options['chip_threadthumb_overwritestatus'], 'padding-left:'.$vbulletin->options['chip_threadthumb_overwritestatus'].'px;', 'background: none !important;'
            ).'">
                <!-- Forum using plugin: Thread Thumbnails 2.0 - Powered by chiplove.9xpro -->
                <img class="preview" src="\'.$thread[\'thumb_src\'].\'" style="width:\'.$vbulletin->forumcache[$thread[\'forumid\']][\'thumb_w\'].\'px;height:\'.$vbulletin->forumcache[$thread[\'forumid\']][\'thumb_h\'].\'px;border:1px solid #c8c8c8;background:#fff;padding:2px;display:block;"\').\' /></a>',
            $vbulletin->templatecache[$template_name]
        );
    }
}


Dragonsys 12-10-2012 05:27 PM

it is working well for me in parse_templates, on vB 4.2 pl3
You can see it here - http://www.lonestarcamaro.com/forums/

gadget069 01-18-2013 02:29 PM

I tried using this mod and i get this error

Quote:

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 523800 bytes) in /home/................/public_html/vb/includes/class_core.php on line 1


All times are GMT. The time now is 08:22 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.01263 seconds
  • Memory Usage 1,851KB
  • 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
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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