Post Ratings - taking likes to the next level [Deleted]

Luke,

For other addons developers, you should provide a way not to have your ratings loaded when FETCH_USER is present.

For one of my mods I wanted to get post data using Post Model existing function, that led to tremendous query times due to the impossibility to avoid to get all your select count(*), which weren't necessary for the purpose of my query.

Clément
 
  • Like
Reactions: Xon
hi! did this code solve the issue between Sticky First Post and Post Ratings?
as I said in my previous message, I'm not sure it's a problem with Sticky First Post and I didn't have much time to figure it out. However, that hack simply fixed the problem I was having. If you forum is reporting the same error as mine did, you may try that piece of code and try to fix it. However, that's a temporal solution and you should dig deeper to find the root of the problem.
 
@Luke Foreman

just purchased this, received this error (many of them)


Error Info
ErrorException: json_decode() expects parameter 1 to be string, array given - library/Dark/PostRating/Model/Post.php:86
Generated By: marclouie, 2 minutes ago

Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(2, 'json_decode() e...', '/home/hoopsph/p...', 86, Array)
#1 /home/hoopsph/public_html/forum/library/Dark/PostRating/Model/Post.php(86): json_decode(Array, true)
#2 /home/hoopsph/public_html/forum/library/LiamW/StickyFirstPost/Extend/ControllerPublic/Thread.php(63): Dark_PostRating_Model_Post->preparePost(Array, Array, Array, Array)
#3 /home/hoopsph/public_html/forum/library/XenForo/FrontController.php(347): LiamW_StickyFirstPost_Extend_ControllerPublic_Thread->actionIndex()
#4 /home/hoopsph/public_html/forum/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/hoopsph/public_html/forum/index.php(13): XenForo_FrontController->run()
#6 {main}

Request State
array(3) {
["url"] => string(87) "Things to do this off-season for the Hotshots?"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

is it in conflict with the Sticky First Post addon? I disabled it and error messages stopped, but i also need it. please HELP!

This would indicate an issue on the Sticky First Post addon's behalf. It appears to be calling preparePost more than once on a given post

Luke,

For other addons developers, you should provide a way not to have your ratings loaded when FETCH_USER is present.

For one of my mods I wanted to get post data using Post Model existing function, that led to tremendous query times due to the impossibility to avoid to get all your select count(*), which weren't necessary for the purpose of my query.

Clément

Definitely an oversight, I will add a flag for this
 
Last edited:
Is it possible to use this to hide the names all the time, and just display a 'like' icon with the number of likes? (No overlay or loading of names at all?)

(To answer my own question now I've bought it: yes)
 
Last edited:
Update planned for 1.5 beta 2? Won't install...................

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 256 bytes) in /home/user/public_html/xxxx.com/library/XenForo/Model/StyleProperty.php on line 145
 
Update planned for 1.5 beta 2? Won't install...................

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 256 bytes) in /home/user/public_html/xxxx.com/library/XenForo/Model/StyleProperty.php on line 145
You have a big forum ? Try increasing memory_limit in php.ini.

Or maybe the new update has a php memory leak somewhere ?
 
You have a big forum ? Try increasing memory_limit in php.ini.

Or maybe the new update has a php memory leak somewhere ?
No, just a brand new, super-small forum. On shared hosting. My php.ini says...............

register_globals = Off

zend_extension="/usr/local/IonCube/ioncube_loader_lin_4.4.so"
zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_4.4_ts.so"

[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.0


zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
 
Not sure on any of that stuff. Shared hosting. Xenforo running fine, just this add-on that won't install on 1.5 beta 2.

You need to raise the PHP memory_limit setting to at least 256MB. Some bits of XF will also fail once your forum gets more busy

Hello @Luke F

Is it the same add on which is used in theadminzone?

:)

I believe so, yes

Is there a way to use the like system by Xenforo parallel to yours?

Post Ratings completely replaces the XF like button on posts, but integrates with the XF like system behind the scenes
 
Hello,

I'm curious if there's a way to turn off certain ratings such as the "dislike", "dumb", and "old".

If there is, how would I go about doing that?

Thanks!
 
Top Bottom