The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I hope I've chosen the correct forum to post this and I hope it's not a dumb question...
So I've made this 'plugin' that assigns a random value from an array to a variable which I then use in my header template. My question is, would it be better to put the array in a php file and use include() in the plugin code, or just dump the array into the plugin file? It works just dumped in (see attached) but I was thinking it would make updating and editing the array easier if use include instead... If I did use include, is there a certain directory that I should use or no? Thoughts, criticism, jello? |
#2
|
||||
|
||||
![]()
if you use it as a plugin, you can easily update the code through your ACP, it is just like the use of include() so to use it again is ridiculous
|
#3
|
|||
|
|||
![]()
Thanks deathemperor. That's kinda what I was thinking, but then I considered that it would be easier for me to tell someone to edit/save/ftp it up and overwrite the existing one than to walk them through the admincp.
That way, someone else can manage the data that the array uses without mucking around in the acp. ![]() And I want it as a plugin so that when I update vb, I don't have to reinstall it. Edit:I opted to go with using the include option for several reasons... You can change the content (even adding more arrays and variables to be used in other templates) without even logging in and because you can put the file anywhere you want even outside of your public_html dir if security is of concern. I can make a dir and give only the officers who need it ftp access to that dir (and only that dir) then point to it in the plugin and not have to think about it again. This is what I've got. I'm still figuring all of this out. I welcome constructive critcism if I've gone wrong in my logic somewhere. oh this is too cool! The same plugin code except use the postbit_display_start hook and I can use my variable in users signatures! :devious: :classic: |
#4
|
||||
|
||||
![]()
I still suggest using the new Product Manager System in RC1, with it when you update your hack it is like you upgrade vbulletin, no ftp access, just ACP.
If you want to set more arrays/varibles, it is still doable in the ACP since you can edit your plugin anytime you want. |
#5
|
|||
|
|||
![]() ![]() But if you knew my particular situation and use, you'd understand why I want the array to be edited in it's own file and have the file in a place where the person updating it (someone without admin privileges) wont have access to accidentally break anything else for me to fix later. Call it pre-emptive damage control on my part. ![]() If it's just a matter of preference (?), I'll leave it this way. I do appreciate your input! ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|