Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CRON Job - Auto upload a file to template Details »»
CRON Job - Auto upload a file to template
Version: 1.00, by Michael Morris Michael Morris is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 10-20-2004 Last Update: Never Installs: 6
 
No support by the author.

This cron job simply loads a text, php or rss file into a template. You use the inbuilt Scheduled Task manager to control exactly when it does this. To set this up download the attached file, open it and set the name of the template to make and the remote url to access, then save it and upload it to your server in the /includes/cron/ directory. If you want to handle multiple remote files, create multiple cron jobs and change the name of the cron job for each one (for instance, file1_uploader.php, file2_uploader.php and so on).

Exactly what you do with this job is up to you of course, as it's applications are fairly open ended. You can use it to import xml files from other sites into your pages, port data between the forums, and so on. I use it to pull up a menu of new products from an affiliated store at another site - using the cron job saves bandwidth for the other machine and allows me to retain style control over the appearance of that data since variables parse when loaded from a template.

I'm sure you guys can come up with other things - and I'd like to hear about them. Have fun.

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 10-21-2004, 08:09 PM
memobug memobug is offline
 
Join Date: Jun 2002
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will click install so I don't forget to install this VERY USEFUL hack. Now I need to let my mind wander to wrap around the potential.

Q1 - will it (can it) overwrite an existing template?
Q2 - does it put the template in ALL styles?
Q3 - You say "load a php file" does that mean it could execute the file and load its output, or will it just load in the raw php code?
Q4 - Screenshots? (of course I am just pulling your leg!)

Thanks!

Matt
Reply With Quote
  #3  
Old 10-21-2004, 09:13 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by memobug
I will click install so I don't forget to install this VERY USEFUL hack. Now I need to let my mind wander to wrap around the potential.

Q1 - will it (can it) overwrite an existing template?
I don't *think* so (I haven't tried). EDIT: It does over-write itself (each time it runs it "updates" the template it points to.

Quote:
Q2 - does it put the template in ALL styles?
Yes.

Quote:
Q3 - You say "load a php file" does that mean it could execute the file and load its output, or will it just load in the raw php code?
I'm fairly sure you could evaluate it from the phpinclude_start template with

PHP Code:
eval(fetch_template('TEMPLATE NAME', -10)); 
Where TEMPLATE_NAME is the template you loaded in.


Quote:
Q4 - Screenshots? (of course I am just pulling your leg!)
http://www.enworld.org/forums/news.php executes code pulled in this way - specifically the ENWorld store on the right.
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 04:46 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.03716 seconds
  • Memory Usage 2,212KB
  • Queries Executed 17 (?)
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
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete