vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Daily Doodle by BOP5 (VB4 & VB3) (https://vborg.vbsupport.ru/showthread.php?t=286101)

autoescala 07-31-2012 06:34 AM

Excellent mod

BirdOPrey5 07-31-2012 11:54 AM

OK to enable compatibility with VB 4.0.0 - VB 4.1.9 you can manually add the required hook.

Instructions:

Open and Edit your /includes/class_core.php file

Find this block of code:

PHP Code:

        if (!isset(self::$template_usage[$template_name]))
        {
            
self::$template_usage[$template_name] = 1;
        }
        else
        {
            
self::$template_usage[$template_name]++;
        }

        return 
$template;
    }


Add the following line ABOVE the return $template; line.

PHP Code:

($hook vBulletinHook::fetch_hook('fetch_template_complete')) ? eval($hook) : false

So the final code will look like:

PHP Code:

        if (!isset(self::$template_usage[$template_name]))
        {
            
self::$template_usage[$template_name] = 1;
        }
        else
        {
            
self::$template_usage[$template_name]++;
        }

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

        return 
$template;
    }


Note: In VB 4.0.8 on which I tested this the line number is Line 4207. This will vary in other VB versions.

The mod will then work in your VB versions. When you upgrade to 4.1.10 or above it will continue to work because the hook is already there.

NOTE- Do no attempt to edit the plugin on this hook, you will not be able to re-save it and you will need to re-install the mod if you try to save it to a different hook.

BirdOPrey5 07-31-2012 02:29 PM

Released Version 1.1

Added option for 4th parameter - Specify URL of the link for the logo. Clicking on the logo will bring the user to this URL. OPTIONAL. If omitted the standard forumhome URL is used.

I am keeping Version 1.0 available for download as well as it is a little less complicated if you don't need the custom URL option.

Thank you to nhawk for some ideas on the code.

nhawk 07-31-2012 03:11 PM

Tested 1.1 on vB 4.2 and it works perfectly.

Thanks!

Mr_Running 07-31-2012 05:16 PM

Yeah, Looks good on 4.2.x

How about a control for max width, height and border...could come in handy when URL is used. :)

BirdOPrey5 07-31-2012 06:50 PM

Quote:

Originally Posted by Mr_Running (Post 2353097)
Yeah, Looks good on 4.2.x

How about a control for max width, height and border...could come in handy when URL is used. :)

of the logo? I don't see these options happening. You can edit/save the logo to be the height and width you want, even add a border if you wanted.

Trek 08-01-2012 12:58 AM

This looks really sweet, now... I just need more logos! hehe

Nirjonadda 08-02-2012 04:12 PM

How I can activate on how many day show on selected image?

Examples:

2012-11-13 | images/logos/BOP5sBirthdayLogo.png | Happy 34th Birthday BirdOPrey5!

This image show on 30 day but how i can do?

BirdOPrey5 08-02-2012 05:02 PM

If you're asking how to get 1 image to show for multiple days you just need to make an entry for each day-

Code:

2012-11-01 | images/logos/BOP5sBirthdayLogo.png | HappyNovember!
2012-11-02 | images/logos/BOP5sBirthdayLogo.png | HappyNovember!
2012-11-03 | images/logos/BOP5sBirthdayLogo.png | HappyNovember!
...
2012-11-30 | images/logos/BOP5sBirthdayLogo.png | HappyNovember!


Nirjonadda 08-02-2012 05:07 PM

So it not work with Start Date 2012-11-01 End Date 2012-11-30 ?

Examples:

2012-11-01 | images/logos/BOP5sBirthdayLogo.png | HappyNovember! | 2012-11-30


All times are GMT. The time now is 06:52 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.01276 seconds
  • Memory Usage 1,746KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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