vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with mod making (https://vborg.vbsupport.ru/showthread.php?t=214219)

cono1717 05-21-2009 06:08 PM

Help with mod making
 
Ok so as you know I am skinner at vBulletin. I'm not the best nor do I claim to be but I wanted to delve in to coding, so I checked out a tutorial (the video one..I forget which) and followed it and made my mod.

Everything works however it requires template edits how to I make these edit's go into the exported XML OR how do I create a custom template containing the code and add that to the navbar template. (I want it to appear there)

I tried creating a custom template called sponsor and placing

Code:

$sponsor
in the navbar but it didn't work.

The only thing that worked was raw html
HTML Code:

<td><div>
e.t.c but as I said earlier when I exported the XML from my test site and imported it to my live site the navbar template edit did not follow, I am sure this is something simple but just cannot find it.

Thanks,

Connor

PS sorry if I explained it terribly.

Lynne 05-21-2009 06:28 PM

You need to have a plugin (or add this at the bottom of a plugin) to eval the template to use (this uses a template_hook):
PHP Code:

eval('$template_hook[template_hook_name_here] .= " ' fetch_template('your_template') . '";'); 

or without a template_hook:
PHP Code:

eval('$sponsor = "' fetch_template('your_template') . '";'); 

And, you would select your product name when you edit your template and then it will export with it. You need to be in debug mode to do this.

cono1717 05-21-2009 07:20 PM

Quote:

Originally Posted by Lynne
And, you would select your product name when you edit your template and then it will export with it. You need to be in debug mode to do this.

I am in Debug mode how do I select my product before editing template.

Lynne 05-21-2009 07:27 PM

If you are in debug mode, then when editing the template in the Master Style, you should see Product at the top and you would choose your product there.

EnIgMa1234 05-21-2009 07:40 PM

That only works when adding new templates.

You can either add the edits needed in the .txt file and include it in your mod folder or you can do an automatic template edit (See article forum).

Lynne 05-21-2009 08:10 PM

Quote:

Originally Posted by EnIgMa1234 (Post 1814838)
That only works when adding new templates.

Yes, you are right. I was talking about the template he created.

cono1717 05-22-2009 11:02 AM

Well thanks to everyone! I got my mod working and am just about to release it, it's a simple starting mod but I hope to get better at it.

I must say another HUGE thanks to the support of vb.org's members.

Thanks


All times are GMT. The time now is 03:28 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.01032 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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