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 04-13-2007, 04:30 PM
Cloudrunner's Avatar
Cloudrunner Cloudrunner is offline
 
Join Date: May 2003
Location: Butte, MT
Posts: 635
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Is there a way to modify the navbar on the fly via a plugin?

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!
Reply With Quote
  #2  
Old 04-13-2007, 04:57 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Cloudrunner View Post
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(); called from the parse_template hook is all you need.
Reply With Quote
  #3  
Old 04-14-2007, 05:20 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's STRONGLY not recommended.
Reply With Quote
  #4  
Old 04-14-2007, 10:07 AM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
It's STRONGLY not recommended.
By whom? 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"
Reply With Quote
  #5  
Old 04-14-2007, 10:34 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 04-14-2007, 01:05 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 04-14-2007, 01:37 PM
rjmjr69's Avatar
rjmjr69 rjmjr69 is offline
 
Join Date: Jan 2007
Location: Southie
Posts: 876
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 04-14-2007, 06:19 PM
da420 da420 is offline
 
Join Date: Nov 2005
Posts: 1,232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #9  
Old 04-14-2007, 06:54 PM
hambil's Avatar
hambil hambil is offline
 
Join Date: Jun 2004
Location: Seattle
Posts: 1,719
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 04-14-2007, 07:59 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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). 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).
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 02:27 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.05597 seconds
  • Memory Usage 2,254KB
  • 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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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