Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 03-20-2011, 11:23 PM
Valcav Valcav is offline
 
Join Date: Nov 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default (need help/how to...) converting mod, converting php-files into plugin...

Hello,

(It's maybe not cool of me, of what I'm writing/asking here.)

I've been looking around and around, but haven't found any clear answer for me... (Maybe/probably because I'm a little bit inpatient, and don't like reading much...)

But here I go.

a) I've searched a special mod for vb4. But it isn't available here, but there is 1 for vb3 here.
So, I downloaded that one. And now I'm trying to convert that one for myself.
But, I don't have much luck

b) So, in the last few days I have been searching again on the internet, and I found a similar mod for vb4. And I like it, but there are some "BUT"s to it...
b1) there are 3 php-files that are needed to be uploaded.
b2) there has to be added something to the template(s) (so that that mod is getting shown).
b3) there are a few things missing to that mod, that would have everything I want.

SO:
C) HOW-TO:
C1) convert those 3 php-files into plug-ins, so that I can install the mod with just 1 file)
C2) what to change/add so there is no need to change any template. (code to let the mod be shown at the top of (any) thread-post. (for example just above/below a poll in a thread))
C3) converting a few things of the vb3 version mod, so that it can be added into that vb4 version.


You'll probably will say:
1) that I have to ask them if I may do it what I want to do. (I know, because of Copyrights)
2) that I maybe should ask that person who made that mod for vb4, if he can add some things to it. (I know, and currently asking it too)
3) that I maybe should ask him also if he can make it so that there is no need of changing any template (I know, and will ask it too)
4) (I know) that I should ask him if he can make it so that there is no need to upload php-files...

BUT,
I'm trying to understand how it (that mod for vb4) works, and how it (that mod for vb3) worked...

So that in the future (when I have some more time, and more relaxed), that I can create some own mods, and/or convert old mods where nobody wants to...


If you need more info of me, or if I have to clarify it a bit more, just ask...

Friendly greetings & thanks,
Valcav
Reply With Quote
  #2  
Old 03-20-2011, 11:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Usually if there are php files, then that means they couldn't use plugins. Why are you not wanting to have three php files?

The easiest way to insert something into a template without having to edit the template is to use a template_hook in the template. So, look in the templates and see if there is one available where you want to put your text.
Reply With Quote
  #3  
Old 03-21-2011, 12:02 AM
Valcav Valcav is offline
 
Join Date: Nov 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Usually if there are php files, then that means they couldn't use plug-ins. Why are you not wanting to have three php files?
Because I'm a little bit lazy...
And I have many sites... (an Alpha, Beta, Charly (test-sites), official site) (all test sites are Password Protected)...
Anything I want to do (add/change), I first add/change to the Alpha (test) site, to see if it works ok.
If everything works ok there, then I go to the Beta (test) site (to see if I still can do it, without any trouble I could have had on the Alpha. and also doing some serious testing, to see if I encounter any bug(s)...
If it's gone well, then I'll then add it to the Charly (test) site (just to refresh my memory, because the time between Beta & Charly can take between 1 week & X weeks)
And after that it's for the Official site...

(and actually at this moment, the Official site isn't even running yet, because at this moment I'm to busy...)

I know, my working method is extremely...
but it's just because I have learned a big lesson from the past... ALWAYS use a test site first...
because our current website/forum (still on phpbb) is really f** up...

Quote:
Originally Posted by Lynne View Post
The easiest way to insert something into a template without having to edit the template is to use a template_hook in the template. So, look in the templates and see if there is one available where you want to put your text.
I know that,
but like I said before, I'm probably to lazy or to inpatient, and don't like to read a lot.
That I can't find the answer (the code) for that.
I know where I want it:
  • in the template: SHOWTHREAD
  • at the hook: {vb:raw template_hook.showthread_above_posts}
just haven't found the exact code to make it happen...
Reply With Quote
Reply

Thread Tools
Display Modes

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:17 PM.


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.03619 seconds
  • Memory Usage 2,174KB
  • 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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (3)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_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