Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
Guild Mate Details »»
Guild Mate
Version: 0.2, by Trek Trek is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.0 Rating:
Released: 07-30-2009 Last Update: 08-24-2009 Installs: 20
Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

This should work on most vBulletin versions, but tested on 3.8.x.

This is an add-on to the vBguild mod. I am not the author of that mod and this add-on is just something I did for my own forums and I thought I'd share it for those using vBGuild as well.

I will continue to support this mod as a separate offering from vBGuild. If you need vBGuild support, please see that mod/author for support for it.

This is considered BETA as well. I'm running it on my forums and it works fine though. Also understand I'm pretty new to writing these mods and I know there are things that can be done to improve performance, etc. If you have suggestions, please make them, kindly.

Also, this is fully phrased so you shouldn't have any trouble using the mod for different languages.

History:

8-25-09 Version .2 released.

* Added in Option to allow all usergroups to use the functionality (Thanks Deyth).
* Updated some config phrases to reflect allowing all usergroups to use the mod.
* Added in global variables to plugin as it appears some template themes don't carry these over already. (Thanks Deyth)
* Updated install instructions as I forgot a template edit prior. This will correct the dropdown with the character data not appearing.

Upcoming:

* Config option to select whether or not you want to display the header again in the popup or not.

* Whatever you guys come up with

Installation:

There is one template edit, the rest is imported through the product.

Edit your Postbit or Postbit Legacy templates

FIND:

Code:
            
            <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
Add BELOW it:

Code:
            <if condition="is_member_of($vbulletin->userinfo, $gm_user_groups_allowed)">
                <div id="GuildMate_$post[postid]">
                        <a class="smallfont" href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[gm_postbit_text]</a>
                        <script type="text/javascript"> vbmenu_register("GuildMate_$post[postid]", true); </script>
                </div>
            </if>


Scroll to the bottom of your postbit template and:

Add:
Code:

<!-- START: Guild Mate $post[postid] popup menu -->
<div class="vbmenu_popup" id="GuildMate_$post[postid]_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="thead" colspan="3" align="center">$vbphrase[gm_modtitle]: $vbphrase[gm_modheader] $post[username]$vbphrase[gm_modheader2]</td>
    </tr>

    $gm_char_data
    </table>
</div>
<!-- END: Guild Mate $post[postid] popup menu -->


Import the product


Once that is done, edit the vBulletin Options -> Guild Mate and set the user groups allowed to see the postbit changes.

Below are some screenshots from my website to help explain what this does.

Download Now

File Type: xml product-guildmate.xml (4.2 KB, 90 views)

Screenshots

File Type: jpg gm_ss_1.jpg (14.1 KB, 0 views)
File Type: jpg gm_ss_2.jpg (18.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 08-24-2009, 04:58 PM
WiGgLr WiGgLr is offline
 
Join Date: Aug 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

treks's

i edited both the postbit and postbit_legacy

i disabled it for now

do you edit both or just one?

and my postbit and postbit_legacy are already customized to display gifts and stuff, think thats why i had trouble knowing where to place the code in the template

this is all new to me and still learning

--edit:
well i just edited my postbit with your first code box in post 17, and i don't get that error when viewing threads, but the link "view characters" doesn't work

adding same code to postbit_legacy made the "view characters" look prettier, but still no function
Reply With Quote
  #23  
Old 08-24-2009, 05:02 PM
Deyth's Avatar
Deyth Deyth is offline
 
Join Date: Sep 2003
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WiGgLr View Post
treks's

i edited both the postbit and postbit_legacy

i disabled it for now

do you edit both or just one?

and my postbit and postbit_legacy are already customized to display gifts and stuff, think thats why i had trouble knowing where to place the code in the template

this is all new to me and still learning
Edit both templates and try my version of the template code. Then, go to the one plugin his addon creates and change the code inside to my version. Let us know if that has a different result.
Reply With Quote
  #24  
Old 08-24-2009, 05:12 PM
WiGgLr WiGgLr is offline
 
Join Date: Aug 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do i use your code for the plugin

i went to vb options --> guild mate, only has option to pick usersgrps who can use it, default at 6

ya when i re-enable the plugin i get that error again viewsing threads/posts

went to plugins & products --> manage products --> guild mate .1 --> edit

pasted this code into the new install box, and still getting error
Code:
global $vbulletin,$userinfo;

$user_chars = $vbulletin->db->query("select vbg.game_name as CharGame, vbs.server_name CharServer, vbc.character_name as CharName FROM " . TABLE_PREFIX . "vbguild_Game as vbg, " . TABLE_PREFIX . "vbguild_Server as vbs, " . TABLE_PREFIX . "vbguild_Character as vbc
WHERE vbc.user_id = '$post[userid]'
AND vbc.server_id = vbs.server_id
AND vbs.game_id = vbg.game_id
ORDER BY vbg.game_name, vbs.server_name, vbc.character_name

");

eval('$gm_header .= "' . fetch_template('gm_char_postbit_header') . '";'); 

$gm_char_data .= $gm_header;
    while($CharData = $vbulletin->db->fetch_array($user_chars))
    {
        $char_game = $CharData['CharGame'];
        $char_server = $CharData['CharServer'];
        $char_name = $CharData['CharName'];
		$gm_user_groups_allowed = explode(',',$vbulletin->options['gm_ugl_view_chars']);
        eval('$gm_char_data .= "' . fetch_template('gm_postbit_char_bit') . '";');
    }
	
	// If there's no character data
	if ($gm_char_data == "") {
		eval('$gm_char_data .= "' . fetch_template('gm_postbit_char_none') . '";');
	}
Reply With Quote
  #25  
Old 08-24-2009, 05:40 PM
Deyth's Avatar
Deyth Deyth is offline
 
Join Date: Sep 2003
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have an instant messenger app of some sort? My info is in my profile; IM me.
Reply With Quote
  #26  
Old 08-24-2009, 06:01 PM
Deyth's Avatar
Deyth Deyth is offline
 
Join Date: Sep 2003
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Trek's plugin code was causing the error. My version of his code works ok...so far.
Reply With Quote
  #27  
Old 08-25-2009, 01:20 AM
THE__DRIFTER THE__DRIFTER is offline
 
Join Date: Feb 2009
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So is Treks version updated? Or should we be using your adjusted code Deyth?
Reply With Quote
  #28  
Old 08-25-2009, 01:41 AM
Deyth's Avatar
Deyth Deyth is offline
 
Join Date: Sep 2003
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by THE__DRIFTER View Post
So is Treks version updated? Or should we be using your adjusted code Deyth?
I don't want to preempt the great thing Trek did by making his addon to my addon but I would say to use mine for now until he updates his. Meanwhile I'm attaching my version of the xml file to this post. I just edited it without testing so let me know if it bombs for some reason. You'll still need to do those manual template edits for now.
Attached Files
File Type: xml product-guildmate.xml (4.0 KB, 13 views)
Reply With Quote
  #29  
Old 08-25-2009, 04:54 PM
floggerss floggerss is offline
 
Join Date: Oct 2008
Posts: 198
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its possible that only a CERTAIN usegrgroup can use it. PLSS
Reply With Quote
  #30  
Old 08-25-2009, 05:22 PM
Deyth's Avatar
Deyth Deyth is offline
 
Join Date: Sep 2003
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by floggerss View Post
Its possible that only a CERTAIN usegrgroup can use it. PLSS
Yes, it's under the vbulletin options for guild mate.
Reply With Quote
  #31  
Old 08-25-2009, 05:51 PM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry all, I've been in the process of moving and am just getting settled. I see that I forgot an initial template edit as well which is why the popup wasn't happening for people.

I've updated the first post to include that edit as well (it's also in the postbit template).

I'll add in the fix for adding in the global variables that fixed the issue of no database connection for some people into the next release as well.

Thanks Deyth for your help on troubleshooting and debugging while I was out. I'll look into your template modifications and see about adding them into the release as well.
Reply With Quote
Reply

Thread Tools

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 05:10 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.08998 seconds
  • Memory Usage 2,336KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete