Go Back   vb.org Archive > vBulletin Modifications > vBulletin 5.x Modifications > vBulletin 5.x Products & Extensions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Yilmaz - Random Images in Header vB5 Details »»
Yilmaz - Random Images in Header vB5
Version: 1.1.0, by yilmaz yilmaz is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Mini Mods - Version: 5.5.5 Rating:
Released: 11-04-2020 Last Update: 11-04-2020 Installs: 8
Supported Uses Plugins Auto-Templates
Additional Files  

A simple api plug.
I uploaded it to review and try.
This could be improved.

Demo Video https://www.youtube.com/watch?v=0oyc8AaJ9GI

========================================
How to install: Installation video https://www.youtube.com/watch?v=wX2T2GXjaIk
========================================
Upload the content of "Yilmaz - Random Images in Header vB5" to your root.
that's all it.
enjoy..

========================================
How to uninstall:
========================================
1. Remove the package "yilmazrandomimg" that located in /core/packages/
2. Go to "Manage Products" in the admincp and delete the product named "Yilmaz - Random Images in Header vB5"

Please Mark as Installed if you use this.
Donations always appreciated. :up:

Download Now

File Type: zip Yilmaz - Random Images in Header vB5.zip (304.0 KB, 32 views)

Screenshots

File Type: png 2020.11.05-18_33_20.png (44.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-05-2020, 11:20 AM
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've uploaded the files, imported the product and even saved the default settings to be sure... But I don't get any changes to the templates\styles that I can see right off hand.

How would I go about using the URL of the random image within a template?

Example URL:

Code:
http://www.example.com/core/packages/yilmazrandomimg/img/1.jpg
I need to be able to control exactly how it should be displayed.

Thank you for your help!
Reply With Quote
  #3  
Old 11-05-2020, 11:46 AM
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see this in template.php;

Code:
		    $yilmazrandomimg_find = '<div class="toolbar">';
			$yilmazrandomimg_replace = '<div style="display: table-caption;text-align: center;"><img src="core/packages/yilmazrandomimg/img/'.$randomnum.'.png" alt="Random image" /></div><div class="toolbar">';
			$result['header'] = str_replace($yilmazrandomimg_find, $yilmazrandomimg_replace, $result['header']);
But when I view a page and check it's page source, the replacement of "<div class="toolbar">" isn't taking place... I still find the original "<div class="toolbar">" in the page source and there is no "<img src="core/packages/yilmazrandomimg/img/'" inside the page source at all...

If I can get that replacement to work, I can just modify that file to display it like I'm trying to do.
Reply With Quote
  #4  
Old 11-05-2020, 12:19 PM
yilmaz's Avatar
yilmaz yilmaz is offline
 
Join Date: Sep 2004
Posts: 751
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tested it from Version 5.4.5 to Version 5.6.4 it worked without any problems.

This code should be in the header template
Code:
<div class="toolbar">

If it is not installed automatically, do manual installation if it is not.

Go to [Add/Import Product] the /core/packages/yilmazrandomimg/xml/product_yilmazrandomimg.xml file on your computer.

Installation vidoe https://www.youtube.com/watch?v=wX2T2GXjaIk
Reply With Quote
  #5  
Old 11-05-2020, 12:42 PM
yilmaz's Avatar
yilmaz yilmaz is offline
 
Join Date: Sep 2004
Posts: 751
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I updated and added alternative option

Reply With Quote
  #6  
Old 05-16-2021, 12:30 PM
lange's Avatar
lange lange is offline
 
Join Date: Apr 2003
Location: Montreal (Canada)
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not compatible with PHP 7.4.15 (5.6.4 PL1 fresh install)

As is, the logo disappears in all my styles under PHP 7.4.15

Warning: Use of undefined constant logo - assumed 'logo' (this will throw an Error in a future version of PHP) in .../packages/yilmazrandomimg/api/template.php on line 28 Warning: Use of undefined constant powered_by_vbulletin_title - assumed 'powered_by_vbulletin_title' (this will throw an Error in a future version of PHP) in .../packages/yilmazrandomimg/api/template.php on line 28

[16-May-2021 01:50:28 UTC] Warning: Use of undefined constant powered_by_vbulletin_title - assumed 'powered_by_vbulletin_title' (this will throw an Error in a future version of PHP) in /home/xxxxxx/public_html/xxxxxxx/core/packages/yilmazrandomimg/api/template.php on line 28

Fixed by myself on PHP 7.4.15.
Reply With Quote
  #7  
Old 07-09-2021, 07:45 PM
SWCForum SWCForum is offline
 
Join Date: Jun 2021
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to make the URL that clicking the banner leads to, change depending on the banner? (Or is there a different version of this mod that does this) as that would be infinitely useful for custom adverts
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04932 seconds
  • Memory Usage 2,284KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete