![]() |
this work great for vbulletin 4.1.1, thanks
Quote:
|
Works on 4.1.4 THANX!
|
1 Attachment(s)
Hey.
Why there are no separators ? Thanks. |
not working on my 4.1.5.... sql errors
|
It's not working on 4.1.6 .
This version of the code is working for me: https://vborg.vbsupport.ru/showpost....79&postcount=5 |
it is possible to add image's article?
|
I have this code:
ob_start(); // Current Week Most Viewed $mostpopularweekget = vB::$db->query_read(" select ".TABLE_PREFIX."cms_node.nodeid as nodeid, ".TABLE_PREFIX."cms_nodeinfo.title as title FROM ".TABLE_PREFIX."cms_node, ".TABLE_PREFIX."cms_nodeinfo where ".TABLE_PREFIX."cms_node.nodeid = ".TABLE_PREFIX."cms_nodeinfo.nodeid AND ".TABLE_PREFIX."cms_node.setpublish = 1 AND ".TABLE_PREFIX."cms_node.publishdate >'".$starttime."' ORDER BY ".TABLE_PREFIX."cms_nodeinfo.viewcount desc LIMIT 10; "); $outputbits = ''; while($article = vB::$db->fetch_array($mostpopularweekget)) { $outputbits .='<div class = "cms_widget_post_bit"><h4 class = "cms_widget_post_header"> <a rel="nofollow" href="content.php?r='.$article[nodeid].'">'.$article[title].'</a> </h4> </div>'; } $output = $outputbits; ob_end_clean(); Can we add a bullet at the begining of each article title ? Thay are not separated at all . |
Sooo... I think I'm noticing a discrepancy... the link has it go to the article plus nodeid, for instance, on my site it's:
http://www.homenetworkenabled.com/content.php?r=129 The actual article address is: http://www.homenetworkenabled.com/co...edia-appliance Which includes the "SEO URL Alias"... both get there, but it appears to be making the viewcount inconsistent... Any way to include the SEO URL Alias so it goes to the correct URL? |
I think I've done what I've mentioned in the post above, who knows if it's right though... you can see it http://www.homenetworkenabled.com
PHP Code:
|
Quote:
|
This is my edited code, it has bullet point at the start and seperated with lines:
Code:
ob_start(); |
any ideas on getting it to pull x number of articles from a specific category instead of view count?
|
Quote:
Then change the PHP code to: Code:
$mostpopularweek_get = vB::$db->query_read(" X = the parentnode you want (this will be a number) Y = The max number of articles you want to pull from that parentnome (also a number.) That *should* work, I haven't tested it at all but it is basic MySQL. I didn't change any of the php code. |
Quote:
Code:
Database error in vBulletin 4.1.12: |
Sorry it should be ORDER BY cn.publishdate desc... I will edit the original code I posted.
|
:) Thanks Joe its working now! :up:
by the way, is there anyway to get the breadcrumbs working like the original one below? https://vborg.vbsupport.ru/attachmen...4&d=1271855308 again thanks a lot, really appreciate it. :) |
Sorry I don't know what you mean by breadcrumbs? To me breadcrumbs were what is under the navbar saying where you are in a forum, it wouldn't have anything to do with a widget... ?
|
Sorry, I meant this https://vborg.vbsupport.ru/showpost....1&postcount=43
https://vborg.vbsupport.ru/attachmen...1&d=1316160231https://vborg.vbsupport.ru/attachmen...2&d=1316160376 I wasn''t too sure what its called, breadcrumb separators maybe? :erm: See how the original has those small dots after each title, I think the original had these separators(?) but they disappeared or stopped working due to a vBulletin upgrade version incompatibility :confused: by the way, how often will it refresh and add more new articles added in the category to the list? currently I have set it to display 12, and have since added a few articles to the category, but it's only showing 7 and hasn't updated the list with the other articles yet. if i added the cache time to say a few hrs or even a few days (in mins) will it auto refresh every few day or so? |
Hey :)
is it possible to change the url? <a href="content.php?r='.$article[nodeid].'"> The ID is not good for social-plugins. A foll url (/content/753-Sorcery) were better.... |
Quote:
As for how often it refreshes there should be a cache time in the widget settings/configuration in the admin cp. It *should* refresh as often as you have it set. You can go to Admin CP -> Maintenance -> Clear System Cache to force the refresh. |
It's not updating, Joe. something is wrong, it also displays nothing if i change the category id from 4 to 2. at category id 4 it shows only 7 articles, but doesn't show anything newly added to that category. i cleared the cache, set the times to 5 min, 20 min, 1 hr. nothing worked :confused:
here's my code Code:
$mostpopularweek_get = vB::$db->query_read(" |
You should NOT be using the category ID...
You need to view the database and use the parentnode number- They aren't the same number as the categoryid but on my forum they seemed to follow (be unique) with the categoryid. That is to say the categoryid might be 3 and the parentnode might be 5... categoryid 4 might have a parentnode of 7. Make sure you are checking the parennode from the database. If you want/need to pull from multiple parentnode numbers then change the line to: Code:
WHERE |
That might be it, thanks but how do you get the parent node number off the database?
|
You need to view the table cms_node table in something like phpmyadmin.
|
Hi,
For this Widget, the PHP code for VBulletin CMS 4.1.12 on my portal is : Code:
ob_start(); http://soudeurs.com/piece-jointe/dis...s_plus_lus.jpg Thanks Best regards |
Not working for me on v4.2 is there an update?
|
Sorry but it is working correctly on V4.2
Using this code. PHP Code:
|
Quote:
cms_widget_post_bit widget_post_bit and you'll get the lines you want |
This thread is two years old. :confused:
|
Quote:
Hehe, bumping an old mod with info is better than replying, "never mind - I fixed it" and then not explaining how. ;-) |
We all appreciate the sharing, that is what makes the community. :)
|
Quote:
|
All times are GMT. The time now is 12:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|