MyBB Community Forums

Full Version: Master Favourite Posts 1.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
good concept and very useful,waiting for complete version.I'll use it for sure.
Thank you mastermunj.
Funny since this was a MyBB 1.2x feature dropped in 1.4x.

I wish they would add it back too.
Whenever I click on it..

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'zak_mybb.m_posts' doesn't exist
Query:
SELECT f.*, p.subject FROM mybb_my_fav_post f RIGHT JOIN m_posts p ON f.pid = p.pid AND f.uid = 1 WHERE p.pid = 197
Did you try the modification as post #8 (by Jockl) said?
I checked the files and they look correct.
I get the same error.
Good Plugin, thanks for the post.
Hi Zak,

I had uploaded new file fixing the problem, did you download it recent?

For now you can fix it as mentioned in this post meanwhile I shall have it re-checked.


(2009-12-14, 01:01 AM)Zak Wrote: [ -> ]Whenever I click on it..

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1146 - Table 'zak_mybb.m_posts' doesn't exist
Query:
SELECT f.*, p.subject FROM mybb_my_fav_post f RIGHT JOIN m_posts p ON f.pid = p.pid AND f.uid = 1 WHERE p.pid = 197
Download fixed version, incl german lang files
[attachment=17609]


I've corrected some little mistakes to get it running on every server, and also added german language files (custom-translated).
This is no official release, but i hope it helps you, i also added the original one and a readme-file where you can read what exactly changed.

==============================================

(2009-11-01, 07:09 PM)Jockl Wrote: [ -> ]Sorry, now it is working for me as well. You have to chande following lines in my_fav_post.php in the root directory:

[...]

thanks, helped me alot.
but there's another fix to run on every database.

line 53:
$select_query = "SELECT f.*, p.subject FROM " . TABLE_PREFIX . "my_fav_post f join " . TABLE_PREFIX . "posts p on f.pid = p.pid and f.uid=$uid ORDER BY $sort_by $order";

line 102:
$select_query = "SELECT f.*, p.subject FROM " . TABLE_PREFIX . "my_fav_post f RIGHT JOIN " . TABLE_PREFIX . "posts p ON f.pid = p.pid AND f.uid = $uid WHERE p.pid = $pid";

note: m_posts was replaced witch ".TABLE_PREFIX."posts

although the table prefixes weren't variable, this is a great plugin, thanks!
greets,
NoMad

EDIT:
For auto-integrate in postbit_classic template change line 356 in inc/plugins/my_fav_post.php
find_replace_templatesets('postbit', '#' . preg_quote('<div class="post_management_buttons float_right">') . '#', '<div class="post_management_buttons float_right">{\$post[\'my_fav_post\']}', 1);
	
	find_replace_templatesets('headerinclude', '#' . preg_quote('{$stylesheets}') . '#', '<script type="text/javascript" src="{\$mybb->settings[\'bburl\']}/jscripts/my_fav_post.js?ver=1400"></script>' . "\n" . '<script type="text/javascript">var quickremove_confirm = "' . $lang->remove_confirm . '"</script>' . "\n" . '{$stylesheets}', 1);

replace with:

find_replace_templatesets('postbit', '#' . preg_quote('<div class="post_management_buttons float_right">') . '#', '<div class="post_management_buttons float_right">{\$post[\'my_fav_post\']}', 1);
	
	find_replace_templatesets('postbit_classic', '#' . preg_quote('{$post[\'button_pm\']}') . '#', '{$post[\'button_pm\']}{\$post[\'my_fav_post\']}', 1);
	
	find_replace_templatesets('headerinclude', '#' . preg_quote('{$stylesheets}') . '#', '<script type="text/javascript" src="{\$mybb->settings[\'bburl\']}/jscripts/my_fav_post.js?ver=1400"></script>' . "\n" . '<script type="text/javascript">var quickremove_confirm = "' . $lang->remove_confirm . '"</script>' . "\n" . '{$stylesheets}', 1);

The symbol will appear on the left.
it's in the Default Template Set -> Post Bit Templates -> postbit_classic in line 34/35. just add
{$post['my_fav_post']}
in some minutes i'll upload the plugin in the form how it works for me!
I activated the plugin and did the edits.
The button shows in the postbit, but the option doesn't show in the UCP.

Is there an edit I'm missing here?
Pages: 1 2 3 4