vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - Guild Mate (https://vborg.vbsupport.ru/showthread.php?t=219909)

ssslippy 08-10-2009 01:17 AM

I can disable invidual scripts in vbseo. Is there any script this is calling.

Also your templates are not cached.

Trek 08-10-2009 01:30 AM

Quote:

Originally Posted by ssslippy (Post 1864300)
I can disable invidual scripts in vbseo. Is there any script this is calling.

Also your templates are not cached.


There's nothing external that I'm calling. I'll work on the caching of the templates.

ssslippy 08-10-2009 02:06 AM

Ok I attempted this on default template

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Mon, 10 Aug 2009 03:05:53 UTC

Code:

Message: 'this.overlay.id' is null or not an object
Line: 11
Char: 10210
Code: 0
URI: http://immortal-guild.net/forums/cli...lobal.js?v=381

I get this after clicking on it. Also VBSEO was off during this time so its not that as I had orginaly thought.

Deyth 08-20-2009 10:02 PM

I found the cause for DiverTree's error. Your plugin code should look like this:
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') . '";');

    while($CharData = $vbulletin->db->fetch_array($user_chars))
    {
        if ($char_game != $CharData['CharGame']) { $gm_char_data .= $gm_header; }
        $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') . '";');
        }

Everything loads but the view characters link isn't popping anything up now and I don't know what the problem there is.

Deyth 08-20-2009 10:56 PM

I figured out the other problem. Here is what the postbit template edits should look like:

Code:

            <if condition="is_member_of($vbulletin->userinfo, $gm_user_groups_allowed)">
<div id="GuildMate_$post[postid]" class="vbmenu_control">
    <a class="smallfont" href="#">$vbphrase[gm_postbit_text]</a>
    <script type="text/javascript">
        vbmenu_register("GuildMate_$post[postid]");
    </script>
</div>
<div class="vbmenu_popup" id="GuildMate_$post[postid]_menu" style="display:none">
    <table>$gm_char_data</table>
</div>
            </if>


DiverTree 08-20-2009 11:08 PM

Quote:

Originally Posted by Deyth (Post 1871300)
I figured out the other problem. Here is what the postbit template edits should look like:

Code:

            <if condition="is_member_of($vbulletin->userinfo, $gm_user_groups_allowed)">
<div id="GuildMate_$post[postid]" class="vbmenu_control">
    <a class="smallfont" href="#">$vbphrase[gm_postbit_text]</a>
    <script type="text/javascript">
        vbmenu_register("GuildMate_$post[postid]");
    </script>
</div>
<div class="vbmenu_popup" id="GuildMate_$post[postid]_menu" style="display:none">
    <table>$gm_char_data</table>
</div>
            </if>


thank you sir ... works like a charm now. :up:

Deyth 08-20-2009 11:54 PM

I just now installed it on my own board and realized there was no way to simply tell it to display to all usergroups so I made that change and, while I was doing that, I saw how it looks with multiple games and didn't like having multiple headers so I changed that too. If you set the "usergroups allowed" option to 0, and it has to ONLY be 0, then it will show to all. Here are my versions of the template edits and the plugin code:

Code:

            <if condition="is_member_of($vbulletin->userinfo, $gm_user_groups_allowed) || $vbulletin->gm_user_groups_allowed == 0">
                                <div id="GuildMate_$post[postid]" class="vbmenu_control">
                                        <a class="smallfont" href="#">$vbphrase[gm_postbit_text]</a>
                                        <script type="text/javascript">
                                                vbmenu_register("GuildMate_$post[postid]");
                                        </script>
                                </div>
                                <div class="vbmenu_popup" id="GuildMate_$post[postid]_menu" style="display:none">
                                        <table>$gm_char_data</table>
                                </div>
            </if>

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') . '";');
        }



Here's an example post. Thanks again for making this.

Deyth 08-24-2009 01:14 PM

It's not working correctly in private messages. It's showing my own character info instead of the user I'm seeing. I'm not sure if it's my own version that's having the problem or if it's present in Trek's as well.

WiGgLr 08-24-2009 04:10 PM

Code:

Fatal error: Call to a member function query_read() on a non-object in /mounted-storage/home84b/sub007/sc45970-PMHN/themondrated.com/includes/class_postbit.php(265) : eval()'d code on line 3
i get this error

Deyth 08-24-2009 04:33 PM

Using my code or Trek's?


All times are GMT. The time now is 01:53 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.01076 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete