Thread: Private Messages Enhancements - Cyb - PM System Enhancements
View Single Post
  #75  
Old 04-09-2007, 05:03 PM
Mudvayne's Avatar
Mudvayne Mudvayne is offline
 
Join Date: Dec 2005
Location: /dev/null/
Posts: 393
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Makc666 View Post
Maybe open "Cyb-CPMSE.xml" and replace origianl code here:
PHP Code:
            if ($vbulletin->options['cyb_pme_newpm_recpt'])
            {
                
$vbulletin->templatecache['pm_newpm'] = str_replace(('$checked[receipt]'),'checked=\"checked\"',$vbulletin->templatecache['pm_newpm']);
            } else {
                
$vbulletin->templatecache['pm_newpm'] = str_replace(('$checked[receipt]'),'',$vbulletin->templatecache['pm_newpm']);
            }

            if (
$vbulletin->options['cyb_pme_newpm_copy'])
            {
                
$vbulletin->templatecache['pm_newpm'] = str_replace(('$checked[savecopy]'),'checked=\"checked\"',$vbulletin->templatecache['pm_newpm']);
            } else {
                
$vbulletin->templatecache['pm_newpm'] = str_replace(('$checked[savecopy]'),'',$vbulletin->templatecache['pm_newpm']);
            }

            if (
$vbulletin->options['cyb_pme_newpm_urls'])
            {
                
$vbulletin->templatecache['pm_newpm'] = str_replace(('$checked[parseurl]'),'checked=\"checked\"',$vbulletin->templatecache['pm_newpm']);
            } else {
                
$vbulletin->templatecache['pm_newpm'] = str_replace(('$checked[parseurl]'),'',$vbulletin->templatecache['pm_newpm']);
            } 
with what you need?
Of course you must know how it works.
Thanks for your suggestion. I've fixed the problem. Actually I'm using custom skin what had login option only on forum home. So I need to change the header to add the login option. Now it appears on every page. Anyway I have edited Cyb - PM System Enhancements - MN plugin.
PHP Code:
if ($vbulletin->options['cyb_pme_enable_global'])
        {
            if ((
$vbulletin->options['cyb_pme_newpmsig_color']!='') OR $vbulletin->options['cyb_pme_enable_pmmenu'])
            {
                eval(
'$cybpmmenu = "' fetch_template('cyb_pme_pmmenu') . '";');
                
$vbulletin->templatecache['header'] = str_replace('$vbphrase[private_messages_nav]','$cybpmmenu',$vbulletin->templatecache['header']);
            }

            if ((
$vbulletin->userinfo['pmunread'] > 0) AND ($vbulletin->options['cyb_pme_newpmsig_bgcolor']!=''))
            {
                
$vbulletin->templatecache['header'] = str_replace(('<td class=\"alt2\" valign=\"top\" nowrap=\"nowrap\">'),'<td valign=\"top\" nowrap=\"nowrap\" style=\"background-color:'.$vbulletin->options['cyb_pme_newpmsig_bgcolor'].';\">',$vbulletin->templatecache['header']);
            }

            if (
$vbulletin->options['cyb_pme_newpm_smil'] AND (THIS_SCRIPT=='private') AND ($_REQUEST['do']=='newpm'))
            {
                
$vbulletin->templatecache['newpost_disablesmiliesoption'] = str_replace(('$checked[disablesmilies]'),'checked=\"checked\"',$vbulletin->templatecache['newpost_disablesmiliesoption']);
            } else {
                
$vbulletin->templatecache['newpost_disablesmiliesoption'] = str_replace(('$checked[disablesmilies]'),'',$vbulletin->templatecache['newpost_disablesmiliesoption']);
            }

            if (
$vbulletin->options['cyb_pme_pm_sig_dis'] AND (THIS_SCRIPT=='private') AND $_REQUEST['do']=='showpm')
            {
                
$cyb_pme_sigrems = array('__________________<br />''$post[signature]');
                
$vbulletin->templatecache['postbit'] = str_replace($cyb_pme_sigrems,'',$vbulletin->templatecache['postbit']);
                
$vbulletin->templatecache['postbit_legacy'] = str_replace($cyb_pme_sigrems,'',$vbulletin->templatecache['postbit_legacy']);
            }
        } 
I just replace the navbar template with header template. Then again as I'm using <td align="$stylevar[right]"></td> for my login box so I got drop down menu text on right side :S. So I need to edit the template also. Just added.
HTML Code:
					<td class="vbmenu_option" align="$stylevar[left]"><a href="private.php?$session[sessionurl]&folderid=0" accesskey="4" rel="nofollow">$vbphrase[inbox]</a></td>
				</tr>
				<tr>
					<td class="vbmenu_option" align="$stylevar[left]"><a href="private.php?$session[sessionurl]&folderid=-1" accesskey="4" rel="nofollow">$vbphrase[sent_items]</a></td>
				</tr>
				<tr>
					<td class="vbmenu_option" align="$stylevar[left]"><a href="private.php?$session[sessionurl]do=newpm" accesskey="4" rel="nofollow">$vbphrase[send_new_message]</a></td>
				</tr>
				<tr>
					<td class="vbmenu_option" align="$stylevar[left]"><a href="private.php?$session[sessionurl]do=trackpm" accesskey="4" rel="nofollow">$vbphrase[track_messages]</a></td>
				</tr>
				<tr>
					<td class="vbmenu_option" align="$stylevar[left]"><a href="private.php?$session[sessionurl]do=editfolders" accesskey="4" rel="nofollow">$vbphrase[edit_folders]</a></td>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01497 seconds
  • Memory Usage 1,850KB
  • 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)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (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