The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
If it works, it works! I do not have a copy of vBulletin in front of me right now, so I am not sure if it is the best way. However, there is no need for a product as you have edited the files directly - products deal with plugins, phrases and templates.
|
#12
|
|||
|
|||
ok, that makes sense. It does work, but I noticed yesterday that the forum info seems to have disappeared.. .so always says 'Last Post' = Never, 'Threads' = 0, 'Posts' = 0. Not sure why that would have happened.
|
#13
|
||||
|
||||
Something must have gone wrong (corrupted cache, maybe). Remove your custom code, and rebuild the cache (Admin CP > Maintenance > Update Counters).
|
#14
|
|||
|
|||
I tried to update the counters without removing my code and it didn't seem to help. The query (when I copy it to a query analyzer) runs fine and brings back all the right information as far as lastpostid and all other forum db info.
When I disable my 'plugin code' it works fine... so something has to be happening with my query addition. I am just not sure why yet. |
#15
|
||||
|
||||
Post your snippet of code so I can take a look.
|
#16
|
|||
|
|||
This is the functions.php file code that I added. Quite simple, really, and I highlighted the additions so you can see them quickly:
Code:
$hook_query_fields = $hook_query_joins = $hook_query_where = ''; ($hook = vBulletinHook::fetch_hook('cache_ordered_forums')) ? eval($hook) : false; // get subscribed forums too if ($userid) { $query = " SELECT subscribeforumid, $counter_select $hook_query_fields ". iif($vbulletin->options['threadmarking'], ', forumread.readtime AS forumread') . " FROM " . TABLE_PREFIX . "forum AS forum LEFT JOIN " . TABLE_PREFIX . "subscribeforum AS subscribeforum ON (subscribeforum.forumid = forum.forumid AND subscribeforum.userid = $userid) " . iif($vbulletin->options['threadmarking'], " LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forumread.forumid = forum.forumid AND forumread.userid = $userid)") . " $tachyjoin $hook_query_joins "; } // just get counters else { $query = " SELECT $counter_select $hook_query_fields ". iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], ', forumread.readtime AS forumread') . " FROM " . TABLE_PREFIX . "forum AS forum " . iif($vbulletin->options['threadmarking'] AND $vbulletin->userinfo['userid'], " LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forumread.forumid = forum.forumid AND forumread.userid = " . $vbulletin->userinfo['userid'] . ")") . " $tachyjoin $hook_query_joins "; } } It's that simple in the functions file. My plugin is pretty simple too: Code:
$hook_query_fields = ",`ForumDetails`.`Details_UID`, `ForumDetails`.`Clean_Name`, `ForumDetails`.`forumid`, `ForumDetails`.`Information1`, `ForumDetails`.`Information2`, `ForumDetails`.`Information3`"; $hook_query_joins = "LEFT JOIN " . TABLE_PREFIX . "ForumDetails ON (ForumDetails.forumid = forum.forumid)"; However - all the stats seem to disappear. They are there and when the query is joined I can see all the same information as I do without the plugin. I ran both queries in an analyzer and the same data is returned in both queries |
#17
|
|||
|
|||
I figured it out. It was a query issue. I had 2 forumid's in there and the forumcache script got confused.
Thanks for all your help. |
#18
|
|||
|
|||
I thought since this thread is mine... and the next step is pretty similar... I would just continue the post here
Anyway - Now that my homepage is up to date with the proper information.. I want each FORUM to have specific information as well. I can't, for the life of me, find where to add these same query joins there. Any pointers? |
#19
|
|||
|
|||
bumpity bump bump
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|