vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   End-User Options - Personal Notepad for 3.7 (https://vborg.vbsupport.ru/showthread.php?t=181811)

athlon64bit 01-24-2010 09:25 PM

I tested it on vb 4 and got an error as well. :( Hopefully it will be updated. :)

Numenorean7 01-29-2010 02:03 AM

I'd like to see it updated for vB4 too.

Arachnophiles 02-25-2010 07:30 AM

Works ok for me, except get the following message above the header, when viewing ../usercp.php

Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: personal_notepad in [path]/includes/functions.php on line 3932

Still able to edit/save notepad.

(Using vB 4.02)

skaarg 05-06-2010 02:34 AM

I fixed the warning on my 4.03 board by editing the plugin to use the new way to get template data.

In Admin Control Panel, expand Plugins & Products, go to Plugin Manager, then find and click on the plugin called "Save personal notepad and add template".

In the Plugin PHP Code box, find the following line (at the bottom):

PHP Code:

eval('$template_hook["usercp_main_pos' $vbulletin->options['notepad_location'] . '"] .= "' fetch_template('personal_notepad') . '";'); 


Replace it with these two lines:

PHP Code:

$templater vB_Template::create('personal_notepad');
$template_hook['usercp_main_pos' $vbulletin->options['notepad_location']] .= $templater->render(); 


Save and enjoy!

Cheers, Alex

Amiga Harrison 06-16-2010 10:49 AM

@skaarg

Thanks for the php update.

However, you have missed a final }; from the end of your code to close the original if statement for this plugin.

So for everyone else, when editing this plugin code to make it work with vB4, replace the following:

PHP Code:

eval('$template_hook["usercp_main_pos' $vbulletin->options['notepad_location'] . '"] .= "' fetch_template('personal_notepad') . '";'); 

With:

PHP Code:

$templater vB_Template::create('personal_notepad'); 
$template_hook['usercp_main_pos' $vbulletin->options['notepad_location']] .= $templater->render(); 
}; 

Works perfectly in vB4.03 with this edit.

I've attached the xml installer I created by exporting the updated version from my current vB4.03 board. I hope that is useful. If someone can test this xml file for me on their site and verify it works, I could then post a new vB4 mod page for this update, and reference this original mod page to give credit.

Boofo 06-16-2010 11:32 AM

Quote:

Originally Posted by Amiga Harrison (Post 2054437)
I've attached the xml installer I created by exporting the updated version from my current vB4.03 board. I hope that is useful. If someone can test this xml file for me on their site and verify it works, I could then post a new vB4 mod page for this update, and reference this original mod page to give credit.

It works but the template needs to be updated as it shows no border or header on the box.

Amiga Harrison 06-16-2010 01:40 PM

Really? The template is fine on my site with heading and border in place. Are you using the default vB4 template or a custom one?

Can you post a screenshot so I can compare to my own installed version?

Fungsten 06-16-2010 07:26 PM

Nevermind I figured it out.

Boofo 06-16-2010 09:25 PM

Quote:

Originally Posted by Amiga Harrison (Post 2054520)
Really? The template is fine on my site with heading and border in place. Are you using the default vB4 template or a custom one?

Can you post a screenshot so I can compare to my own installed version?

Sorry, I went ahead and uninstalled the mod as it was not working for quite a few things in vb 4 after trying to change the template to vb 4 standards. There are too many things it needs to be updated for in vb 4.

Fungsten 06-17-2010 04:09 PM

Quote:

Originally Posted by Amiga Harrison (Post 2054437)
@skaarg

Thanks for the php update.

However, you have missed a final }; from the end of your code to close the original if statement for this plugin.

So for everyone else, when editing this plugin code to make it work with vB4, replace the following:

PHP Code:

eval('$template_hook["usercp_main_pos' $vbulletin->options['notepad_location'] . '"] .= "' fetch_template('personal_notepad') . '";'); 

With:

PHP Code:

$templater vB_Template::create('personal_notepad'); 
$template_hook['usercp_main_pos' $vbulletin->options['notepad_location']] .= $templater->render(); 
}; 

Works perfectly in vB4.03 with this edit.

I've attached the xml installer I created by exporting the updated version from my current vB4.03 board. I hope that is useful. If someone can test this xml file for me on their site and verify it works, I could then post a new vB4 mod page for this update, and reference this original mod page to give credit.

Thanks!! It worked.


All times are GMT. The time now is 07:15 AM.

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.01357 seconds
  • Memory Usage 1,761KB
  • 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
  • (6)bbcode_php_printable
  • (3)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