Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-12-2009, 04:08 PM
HyperActiv HyperActiv is offline
 
Join Date: Mar 2009
Location: Israel
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 03-12-2009, 04:53 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 03-12-2009, 04:57 PM
HyperActiv HyperActiv is offline
 
Join Date: Mar 2009
Location: Israel
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 03-12-2009, 05:10 PM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 03-12-2009, 05:11 PM
HyperActiv HyperActiv is offline
 
Join Date: Mar 2009
Location: Israel
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RLShare View Post
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.
Reply With Quote
  #6  
Old 03-14-2009, 04:09 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Output of a hash? The whole point of a hash is that it is one-way...
Reply With Quote
  #7  
Old 03-14-2009, 04:22 AM
RLShare RLShare is offline
 
Join Date: Jun 2008
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 03-14-2009, 05:11 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also note that no encoded/encrypted code in any modifications are allowed on vB.org. (Minified JS is OK.)
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:01 PM.


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.04014 seconds
  • Memory Usage 2,226KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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