Thread: Moderators Functions - One-touch Spam Ban and Cleanup
View Single Post
  #329  
Old 01-04-2009, 09:15 AM
r5e r5e is offline
 
Join Date: Oct 2005
Location: Sydney
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Quarterbore and CCV Pinto for your suggestions on the template edits, they've saved me a bit of time investigating and they make perfect sense.

As those of you who have read further back though this thread may know, I will try to keep my late brother's mod going as best as I can, but I lack the time and the skills that he had, so I will have to rely on the community in here and do the best I can.

I would like to release an update for this product that allows for the changes made to the user profile page (MEMBERINFO template) since 3.7. However, I want to make sure that I do this properly and not just a "dirty hack" as the original author felt quite strongly about. He was big on making a product that did not require template edits and was easy to keep going after vb upgrades. In some respects, he did a very good job on this, as the product is still going strong even on 3.8, though the change on the MEMBERINFO template since 3.6 has removed part of its functionality.

Whilst I appreciate the suggestions for template edits made so far, ideally, I'd like to do this properly and change the code in his product so that extra template edits are not required and the new version works without requiring them - just import product xml and forget. There seem to be 2 ways of doing this:

1. Have code that specifically looks for the last link in the profile page and adds the link for this product after it. The current code works specifically for the 3.6 template, so ignores the new one. If this option were used, it would still be specific to the 3.7/3.8 template and may need to be updated if this template changes again in the future.

2. Use existing hooks in the postbit and MEMBERINFO templates to insert the links for this product. I have experimented with this already, but the positioning of the existing hooks in the MEMBERINFO templates is not ideal, though functional. This would ultimately be the preferred option as it is a little bit more future-proof, as well as being simpler to code (I think).

This is where I am now stuck. I am not a coder, but I can hack. I can release a quick and dirty hack based on suggestions so far, but I won't do this as it is not in the spirit of what Mark would have done with his code. He had written some very good and detailed tutorials on how to do this properly, but after spending a few hours on this already, my head hurts as this is not my native language.

I was hoping that someone out there could offer me some code to do either option 1 or 2 properly and then I will release it and make everyone's life easier (hopefully).

I welcome your suggestions.

Robert (brother of the late author of this mod)

(P.S. while condolences and appreciation are appreciated, they are not necessary, let's just get some working code instead please.)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01263 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete