[TH] Extend Post Ratings [Deleted]

Jake B. updated Extend Post Ratings with a new update entry:

1.0.3

This update includes the following fixes:

  • Disabled ratings no longer show up as tabs
  • classes on the tabs so you will be able to customize them with something such as this -Thanks @Sheldon!
  • Default rating to show when you load the leaderboard page - This defaults to the first tab displayed
  • Sidebar block for the top rating receivers - NOTE: This was prematurely released due to the other...

Read the rest of this update entry...
 
Hi,

I tried updating to 1.0.3 from 1.0.1 and get this error:
Code:
Server Error

Mysqli statement execute error : Duplicate column name 'epr_like_given'

Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 317
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in ExtendPostRating/Listener/Install.php at line 9
ExtendPostRating_Listener_Install::install()
call_user_func() in XenForo/Model/AddOn.php at line 215
XenForo_Model_AddOn->installAddOnXml() in Waindigo/CustomFields/Extend/XenForo/Model/AddOn.php at line 114
Waindigo_CustomFields_Extend_XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in AddOnInstaller/ControllerAdmin/AddOn.php at line 272
AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/xxxxxxxx/public_html/admin.php at line 13

When I check the xf_user table in the DB there is 1 column named 'epr_like_given'
 
Hi,

I tried updating to 1.0.3 from 1.0.1 and get this error:
Code:
Server Error

Mysqli statement execute error : Duplicate column name 'epr_like_given'

Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 317
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in ExtendPostRating/Listener/Install.php at line 9
ExtendPostRating_Listener_Install::install()
call_user_func() in XenForo/Model/AddOn.php at line 215
XenForo_Model_AddOn->installAddOnXml() in Waindigo/CustomFields/Extend/XenForo/Model/AddOn.php at line 114
Waindigo_CustomFields_Extend_XenForo_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in AddOnInstaller/ControllerAdmin/AddOn.php at line 272
AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/xxxxxxxx/public_html/admin.php at line 13

When I check the xf_user table in the DB there is 1 column named 'epr_like_given'

You're the second person to have this issue, they had it on TAZ too and I'm not sure why it gives this error to some people, but not everyone, I haven't had a chance to check it out yet. However, in library/ExtendPostRating/Listener/Install.php comment out or remove the following line:
Code:
$db->query('ALTER TABLE xf_user ADD epr_like_given INT(10) UNSIGNED NOT NULL DEFAULT \'0\' AFTER like_count;');

Then run the update again and it should work fine.

Also, Don't forget to rebuild your like cache (instructions are in the resource description) for the likes given portion to work properly.
 
Hello @Jake B. , this is a very nice modification (exactly the kind of modification you wonder why it have not been a core feature!).
Is it possible to hide (or disable) the "Post ratings" tab ?
 
Is it possible to hide (or disable) the "Post ratings" tab ?

Currently there is no option to hide that link, however if you would like to you can modify library/ExtendPostRating/Listener/CodeEvent.php and comment out/remove the following:
Code:
        $extraTabs['postRatings'] = array(
            'title'            => new XenForo_Phrase('dark_post_ratings'),
            'href'            => XenForo_Link::buildPublicLink('post-ratings'),
            'position'        => 'middle',
            'linksTemplate'    => 'epr_navigation_tab',
        );

Then I'll be sure to include an option to remove the link in the next release.
 
If hidden, where or what will be done for others to reach the link? Will it get displayed elsewhere?
 
If hidden, where or what will be done for others to reach the link? Will it get displayed elsewhere?

I may add options to put it somewhere else (perhaps a child link of forums, or members), or to completely remove the link (so you can manually add it wherever you want)
 
  • Like
Reactions: IPF
I may add options to put it somewhere else (perhaps a child link of forums, or members), or to completely remove the link (so you can manually add it wherever you want)
I'd like to see it as a child-link to forum - save on the main navbar space. Starts getting a little crowded after a while :D
 
@Jake B. thanks for releasing this.
I had a few problems installing it on AVForums.
Several 'Too many connections' errors and the site slowed down considerably during the install process.
I'm guessing this was related to adding a column to a large table?
We have 1.84 million records in the dark_postrating table.
Page load of the various tabs is still quite slow.
https://www.avforums.com/post-ratings/
Is there any value in adding an index to dark_postrating_count -> count_given?
Or to anything else?

Also we use the [bd] Widget Framework, so the sidebar widget does not appear on our forum list.
Could you include a widget for the Widget Framework addon please?
 
Last edited:
Several 'Too many connections' errors and the site slowed down considerably during the install process.
I'm guessing this was related to adding a column to a large table?
That is likely, it's hard to test something on such a large board without having access to a large board.

We have 1.84 million records in the dark_postrating table.
Page load of the various tabs is still quite slow.
https://www.avforums.com/post-ratings/
Is there any value in adding an index to dark_postrating_count -> count_given?
Probably not, as the only field being added was the likes_given which is something that isn't stored by the PostRatings add-on, or xenforo. I don't notice any slow load speeds on when loading that page, any chance you could provide some information given in the footer of that page (only displayed to admins) such as number of queries being run, and the time it took to prepare the page?

By the way: You should rebuild your likes cache using the Rebuild Caches page so that your given likes show up properly.

Also we use the [bd] Widget Framework, so the sidebar widget does not appear on our forum list.
Could you include a widget for the Widget Framework addon please?

I do plan on including a widget framework renderer in the next release after I finish the sidebar block, however it is recommended that you do not enable the sidebar block as noted in the release notes as it was released prematurely due to needing to make a new release because of some issues that made this add-on nearly unusable for a few people in the previous release.

I'll look into this more in depth after I get off work though.
 
Finally got around to updating.

With the inclusion of the "Top Givers and Top Recievers" on the main page of this add-on, made it so much easier in removing the navigation tab.

Screenshot_2.webp

Now, with the Navigation Tab removed, created my own phrase, and moved it under the "Forum" navtab.

ratings.gif

Great work @Jake B. , can't wait to give you some ideas on a widget.
 
Finally got around to updating.

With the inclusion of the "Top Givers and Top Recievers" on the main page of this add-on, made it so much easier in removing the navigation tab.

View attachment 98176

Now, with the Navigation Tab removed, created my own phrase, and moved it under the "Forum" navtab.

View attachment 98177

Great work @Jake B. , can't wait to give you some ideas on a widget.

How did you remove the navtab? It just won't disappear for me.
 
@Jake B.

Is it possible to move the Post Ratings tab along the menu or to disable it so I can use custom tabs to link to the post rating at a tab location of my choosing?

For example I want the Post Ratings Tab to show AFTER the News and Interviews tabs, not before...

XP2Hometab.webp
 
Top Bottom