View Full Version : Is there a way to modify the navbar on the fly via a plugin?
Cloudrunner
04-13-2007, 04:30 PM
In a perfect world I would love to see a plugin or code for product install that will modify the navbar on the fly and input my new link without user intervention. Is this possible?
Thanks
-CR
Woops wrong forum...sorry!
magnus
04-13-2007, 04:57 PM
In a perfect world I would love to see a plugin or code for product install that will modify the navbar on the fly and input my new link without user intervention. Is this possible?
Thanks
-CR
Woops wrong forum...sorry!
Simpy put, yes. It's done quite often.
A properly formed str_replace(); (http://us.php.net/str_replace) called from the parse_template hook is all you need.
Dismounted
04-14-2007, 05:20 AM
It's STRONGLY not recommended.
hambil
04-14-2007, 10:07 AM
It's STRONGLY not recommended.
By whom? :p Auto-template replaces have been one of the ongoing debates around here for a while. It started back when I was new (I'd like to think I helped launch the no-file or templates edits product crazy).
End users love it - one click installs. Designers tend to hate it, because hand tweaking templates is their bread and butter - and auto-replaces often don't work on tweaked templates. Coders are split on the issue, with some like me feeling a user should never need to edit a file or template, while others feeling that if you aren't willing to learn a little about vb and templates and code, you have no business installing mods. "It was hard for me, it should be hard for you" :p
Dismounted
04-14-2007, 10:34 AM
Not all end-users, they don't like it when they've got a highly modified template and can't get things to show up. :p
magnus
04-14-2007, 01:05 PM
Most people, if given the choice between template edits and no template edits.. will pick no template edits.
When designing a modification, you just need to add a AdminCP option. "Perform automatic template edits? Yes/No"
Problem solved.
rjmjr69
04-14-2007, 01:37 PM
I like when they are automatic and am very surprised at the lack of this feature being used.
Personally I assumed that it was some difficult process and thats why coders stayed away from doing it. hhhhhmmmmmmm
But I like many I've talked to and read comments by feel that doing some of the work is the best part of doing it. I love it when its a challenge to find the write code to modify or the place to insert it. I have a highly customized skin which is not very user friendly when editing.
Its toss up If its not that hard to include It would be nice for the lazy people I would use it from time to time for something easy and mundane. Having the option of yes or no would be the best IMO.
Just my .2 cents
da420
04-14-2007, 06:19 PM
When I get a hack that does automatic template edits, I will many times go into the plug in and delete the code that does the template edit, or disable the plug in completely if it's not that important. Once that is done, I go in and do the template edits manually, where I would like them. This way it's easier to debug when needed, and it gets exactly where I want them, methinks it uses less memory/resources on the server, and it makes me learn. The only thing bad is finding every edit I did, but have since realized that I need some kind of documentation as to what edits I have done, so now I have a template edit log that I save on my computer. It saves me a lot of time. Other than that, it's personal preference really...
hambil
04-14-2007, 06:54 PM
Personally, I find a lot of support questions I get on my hacks are from people with styles that heavily modify the templates. I use styles that do no template edits, and are always children of the default style, and make all the changes via css and graphics. Because of this I've had almost zero problems with hacks in general, and auto-template edits in specific.
If a member chooses to use a heavily stylized skin, and side menus, and ads, and portals, they are sort of on their own when it comes to my hacks IMHO. I will try to help, when I have time and desire, but I don't put much priority on it.
Paul M
04-14-2007, 07:59 PM
I have been using automatic template updates (via hooks) for the last 18 months ( my Members Who Visited Today was the first mod of mine to use it in Oct 2005 (https://vborg.vbsupport.ru/showpost.php?p=803742&postcount=397)). In all that time I could almost count the number of problems with custom styles on my fingers - it's simply not a common problem. Even so, soon after I converted my mods to vb 3.6 I started adding the option in them to disable the automatic updates if you preferred (and also to edit the string they searched for).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.