vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How can i use my own $template variable? (https://vborg.vbsupport.ru/showthread.php?t=208127)

HyperActiv 03-12-2009 04:08 PM

How can i use my own $template variable?
 
Hello everyone,

can someone teach me how can i integrate a template with another template?
like FORUMHOME template, in the end of it there is a $footer and it shows the footer template in the home page of the board.

RLShare 03-12-2009 04:53 PM

To add custom templates you would need to write a plugin or edit the files so that it grabs the data from the database about your template and stores it in a variable such as '$footer' and then edit the template you want the data to show up in and place the variable wherever you want the data to be displayed.

HyperActiv 03-12-2009 04:57 PM

Im not really how to do what you did, can some one please writh an article about it?

Im asking it because i wanna add credit to modifcation i build, and i wanna publish it, how can i code an very hard removal credit? like vBCredit does?

I used template hook, but its very easy to know where is the hook in the plugins and remove it, does somebuddy have an idea?

by the way- sorry for my very bad english.

RLShare 03-12-2009 05:10 PM

Most credits systems are not actually hard to remove, they are usually just a plugin that inserts it into a template with a call to str_replace.

HyperActiv 03-12-2009 05:11 PM

Quote:

Originally Posted by RLShare (Post 1766595)
Most credits systems are not actually hard to remove, they are usually just a plugin that inserts it into a template with a call to str_replace.

can you please give me an example code to str_replace?

--------------- Added [DATE]1236911056[/DATE] at [TIME]1236911056[/TIME] ---------------

Ok thanks for the help, i've learned how to do what i wanted to do.

what i was meant is something like this:

Code:

$text = " this is the text that will be shown in the board after you added the $text in your template ";
but now i have another question:

if i want to put a MD5 hash, how can i do that it will shows the text [output of the hash] and no the hash himself.

for example:

$credit = " 54b258dae2756c5b3be4530c2959148c ";
^this will be in the plugin/php file

and in the board himself, the client side will see the word "vbulletin"
how can i do that?

Thanks for the helpers.

Dismounted 03-14-2009 04:09 AM

Output of a hash? The whole point of a hash is that it is one-way...

RLShare 03-14-2009 04:22 AM

What your looking for is something like base64_encode() and base64decode()

But personally, I will never use a modification that does such a thing and really no other user should either. You can use those methods to hide malicious code.

Dismounted 03-14-2009 05:11 AM

Also note that no encoded/encrypted code in any modifications are allowed on vB.org. (Minified JS is OK.)


All times are GMT. The time now is 06:24 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.01199 seconds
  • Memory Usage 1,726KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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