PDA

View Full Version : (need help/how to...) converting mod, converting php-files into plugin...


Valcav
03-20-2011, 11:23 PM
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 :p

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

Lynne
03-20-2011, 11:33 PM
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.

Valcav
03-21-2011, 12:02 AM
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...

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...