vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   TOTW: Thread of the Week Poll - Version 1.16 (https://vborg.vbsupport.ru/showthread.php?t=74737)

docvader 01-29-2005 05:00 AM

Sent it to you. Hope that helps.

Marco van Herwaarden 01-29-2005 06:21 AM

I will have a look at your feedback, thanks for sending.

Hope i can do this this weekend, otherwise on monday.

trackpads 02-01-2005 02:43 AM

Quote:

Originally Posted by MarcoH64
There is a modified version ready, but i am still waiting to get test results back. Seems the person testing is a bit busy with other things atm.

Let me know!

Is Ucash support in this one?

thanks!

-Jason

sabret00the 02-02-2005 07:39 AM

ok, well yesterday was the first of the month and it failed to create a new poll :(

Marco van Herwaarden 02-04-2005 03:10 PM

My excuses for all that have been waiting for a fix to this hack, but i have hardly been online due to some unexpected family things i had to take care of.

With the help of the debug information provided by 'docvader' (thanks for this) i finally pinned the problem down to a strange difference in the way a Cron Job handles variables when using the "Run Now" or when it is run started by the Scheduler. This is sorted now and should solve all the problems mentioned in this thread.

I decided to release this now and not to wait until uShop integration will be finished, because it makes the hack almost useless without.

You can simply patch your installation by replacing the "includes/cron/threadoftheweek.php" with the new supplied version 1.12.

Changes in this version:
- Fixed bug where threadoftheweek.php would not run correct (or even generate a database error) when running through the scheduler (as oppsed to running it with "Run Now")
- Added loads of debug information. To activate debugging, change includes/cron/threadoftheweek.php and uncomment the line "// $TOTW_DEBUG = TRUE;". Debug lines will go to the Scheduler log.
- Forum counters will now be updated when a new poll is posted.
- Fixed bug where "Run on day x of month" didn't work.
- Some minor changes
- The first time the rule is run, only threads with a last postdate in the time interval which is set for the rule will be selected as Candidates. In the older versions all threads where considered on the first run.

sabret00the 02-05-2005 08:38 PM

Quote:

Originally Posted by MarcoH64
My excuses for all that have been waiting for a fix to this hack, but i have hardly been online due to some unexpected family things i had to take care of.

With the help of the debug information provided by 'docvader' (thanks for this) i finally pinned the problem down to a strange difference in the way a Cron Job handles variables when using the "Run Now" or when it is run started by the Scheduler. This is sorted now and should solve all the problems mentioned in this thread.

I decided to release this now and not to wait until uShop integration will be finished, because it makes the hack almost useless without.

You can simply patch your installation by replacing the "includes/cron/threadoftheweek.php" with the new supplied version 1.12.


Changes in this version:
- Fixed bug where threadoftheweek.php would not run correct (or even generate a database error) when running through the scheduler (as oppsed to running it with "Run Now")
- Added loads of debug information. To activate debugging, change includes/cron/threadoftheweek.php and uncomment the line "// $TOTW_DEBUG = TRUE;". Debug lines will go to the Scheduler log.
- Forum counters will now be updated when a new poll is posted.
- Fixed bug where "Run on day x of month" didn't work.
- Some minor changes
- The first time the rule is run, only threads with a last postdate in the time interval which is set for the rule will be selected as Candidates. In the older versions all threads where considered on the first run.

in the next version can it use the thread-create-date instead of the last post date.

Marco van Herwaarden 02-05-2005 09:23 PM

Optional maybe?

The Geek 02-08-2005 09:13 PM

Nice 1 ;)

*The geek toggles his install switch

sabret00the 02-09-2005 09:59 AM

Quote:

Originally Posted by MarcoH64
Optional maybe?

that would actually be a good idea.

The Geek 02-09-2005 11:56 AM

Quote:

Originally Posted by sabret00the
that would actually be a good idea.

Dont know if this has been suggested... but a naming scheme would be good instead of all polls with the same title.

Just a thought :)

Marco van Herwaarden 02-09-2005 11:58 AM

Quote:

Originally Posted by the nail geek
Dont know if this has been suggested... but a naming scheme would be good instead of all polls with the same title.

Just a thought :)

I am working on the next version right now. Any suggestions for some naming scheme's?

deb0 02-14-2005 10:02 AM

Quote:

Originally Posted by docvader
Database error in vBulletin 3.0.6:

Invalid SQL: SELECT
threadid
, ((views * ) + (replycount * )) AS score
, views
, replycount
, title
, postusername
, postuserid
FROM thread
WHERE lastpost > 0
AND forumid IN ()

ORDER BY score DESC
LIMIT

mysql error: You have an error in your SQL syntax near ') + (replycount * )) AS score
, views
, replycount
, title
, postuse' at line 3

mysql error number: 1064

Date: Saturday 22nd of January 2005 04:14:04 AM
Script: http://x.russbo.com/vb/cron.php?&rand=173925
Referer:
Username: Unregistered
IP Address: 65.173.88.230.

I'm getting the same thing.

I also noticed that the mod doesn't seem to be working. Isn't a poll/thread supposed to appear in the forum you specify?

Help!

Marco van Herwaarden 02-14-2005 10:15 AM

Are you using the 1.12 version of the threadoftheweek.php?

This one is downloadable seperate in this thread (look at the hack in the top).

PS This week there will be a new version with some extra's like uCash integration. I will post it as soon as i had time to finish upgrade/installer and it is tested. But a bit busy with normal work atm.

sabret00the 02-14-2005 10:15 AM

Quote:

Originally Posted by MarcoH64
I am working on the next version right now. Any suggestions for some naming scheme's?

i thought if it could get the 'month' or 'week' and use that it'd be good.

SnowBot 02-14-2005 04:11 PM

Think i may try this out.

/me clicks install

TTG 02-17-2005 02:32 AM

Appears to have stopped again !?
Last run 5.2.2005 .. run the cron job manually and see message "Thread of the Week
Done", but no new poll !?

Marco van Herwaarden 02-17-2005 03:43 AM

After you run it manually, it still say last run 5.2?

It could be that there are not enough candidate threads selected.

Marco van Herwaarden 02-17-2005 03:44 AM

Edit: On what schedule is this Poll set in the Rule?

TTG 02-17-2005 10:25 AM

Quote:

Originally Posted by MarcoH64
After you run it manually, it still say last run 5.2?

It could be that there are not enough candidate threads selected.

After a manual cron the date of the next run is listed as "18-02-05 12:59 AM" but no new Thread has been added to the poll section !

I've changed the The weight the number of thread views has in the selection process and The weight the number of replies has in the selection process to just 5 and still no joy.

The Geek 02-17-2005 10:51 AM

Quote:

Originally Posted by TTG
After a manual cron the date of the next run is listed as "18-02-05 12:59 AM" but no new Thread has been added to the poll section !

I've changed the The weight the number of thread views has in the selection process and The weight the number of replies has in the selection process to just 5 and still no joy.

Same here.
First run was fine. Since then, scheduled or manually running it doesnt work. Looking at the cron log, it keeps telling me it is updated - but no new thread. Just ran with debugging on and got this:

PHP Code:

Thread of the Week Started12:49 PM
Start processing rule 1 
(Thread of the week)
Key data idactives.types.valuepostfidpostuserThe Nail Geek aforumsa:7:{i:0;s:2:"11";i:1;s:1:"7";i:2;s:1:"6";i:3;s:2:"17";i:4;s:2:"21";i:5;s:2:"18";i:6;s:2:"22";} - wviews50 wreplies50 last1107904020 prevpoll11863
Rule has run before
daily or weekly scheduleTimenow1108644573 timecut1108039773 
Rule don
't need to run now, skipping 
Thread of the Week polls updated. 12:49 PM 

So it looks like it is already thinking it has run?

Marco van Herwaarden 02-17-2005 10:54 AM

What settings do you use in the rule for Schedule Options for Rule?

The Geek 02-17-2005 11:02 AM

see attachment :)

Marco van Herwaarden 02-17-2005 03:57 PM

At "Post Poll in Forum" you have set it to "Main". Is this a postable forum, not a section?

The Geek 02-17-2005 04:39 PM

Quote:

Originally Posted by MarcoH64
At "Post Poll in Forum" you have set it to "Main". Is this a postable forum, not a section?

Its a postable forum.

The Geek 02-17-2005 06:35 PM

BTW:

I got it to work by deleting the lastrun value from the rule. I also changes the sql critera so that it pulled based on dateline not lastpost. Really old threads that had been bumped within the last week appeared and it was a tad confusing. Since it should be thread of the week I assumed that the thread would have started within the time frame.

Anyway - just thought I would throw that in if it helps.

BTW: Why check when the lastrun was? If its a cron job then that runs automatically whenever you specify. If I wanted twice a week, I would set the cron job up accordingly. What is happening is that the lastrun date is never lower than the $cut date so it doesnt run the do_run_rule

Marco van Herwaarden 02-17-2005 07:00 PM

Thanks for looking into it. I have a new version being beta tested and one of the new options is the choice of selecting threads based on thread start or on last post. Also it will have uShop integration, posting of the result in a "Winners Post", replacement variables in the thread title, and some more small things.

About testing the lastrun, you can have multiple rules, 1 running every day, and one running on a weekly or monthly schedule. The cronjob will need to run every day in this scenario, and only execute those rules that are supposed to be executed. Don't get what you say about lastrun never being lower then $cut, but will check it against the code tomorrow.

PS If you are just starting up, you could also help beta testing the new version ;)

TTG 02-17-2005 07:53 PM

Quote:

Originally Posted by The Geek
Its a postable forum.

Already posted twice into the specified 'Polls Forum'

Marco van Herwaarden 02-18-2005 02:59 AM

Quote:

Originally Posted by TTG
Already posted twice into the specified 'Polls Forum'

Sorry i don't understand this reaction? you mean it already worked good twice on your board?

TTG 02-18-2005 10:59 AM

Quote:

Originally Posted by MarcoH64
Sorry i don't understand this reaction? you mean it already worked good twice on your board?

Correct .. worked fine twice and then never worked again !?

Marco van Herwaarden 02-18-2005 03:50 PM

New version released, now with uCash integration.

Please check out the change log.

All reported bugs should be solved. If you find any (new) bugs, please report them again.

sabret00the 02-18-2005 03:52 PM

fantastic update, thank you, you've done some great work here :)

Marco van Herwaarden 02-21-2005 09:55 AM

Quote:

Originally Posted by sabret00the
fantastic update, thank you, you've done some great work here :)

And thank you for testing :D

PS sabre, you might wanna download the released version and upload the threadoftheweek.php to your board, made some minor changes after your last test.

TTG 02-25-2005 02:33 PM

Another week passes and still waiting for this to work, either via cron or manually running cron :ermm:

KW802 02-25-2005 03:06 PM

I think this hack might do what I'm after but I'm curious about the rules.

Would I be able to create a rule so that the selection criteria is ... Select the first X amount of threads between date X & date Y sorted by descending (high to low) rating by replies by views?

Romeos Tune 02-26-2005 01:17 AM

It ran once for me and then never worked again even manually running the script and seems abandoned. I dunno.....

Marco van Herwaarden 02-26-2005 06:44 AM

Quote:

Originally Posted by KW802
I think this hack might do what I'm after but I'm curious about the rules.

Would I be able to create a rule so that the selection criteria is ... Select the first X amount of threads between date X & date Y sorted by descending (high to low) rating by replies by views?

Not until date Y, but from date X until now. And yes, it can take the top X threads based on (configurable) replies and views.

@all who have problems.
What version are you running?
If you have problems, please post the version you're running, the settings for schedule you're using, the settings for the weights, and how often the cronjob is run.

Marco van Herwaarden 02-26-2005 06:45 AM

Quote:

Originally Posted by Romeos Tune
It ran once for me and then never worked again even manually running the script and seems abandoned. I dunno.....

How you mean abandoned? That the script don't work anymore, or that there is no support?

Please see my remark above, about posting your config in case of problems. If you want you can also send it to me by PM.

Romeos Tune 02-26-2005 03:32 PM

Sorry about that..... I am running 1.13 and getting database errors when running the cronscript:

Invalid SQL: SELECT * FROM vb3_threadoftheweekpolloption
WHERE threadofweekrulesid = 1
mysql error: Table 'vb.vb3_threadoftheweekpolloption' doesn't exist

mysql error number: 1146

It's inserting and extra vb into the table name for whatever reason.

MikaK 02-26-2005 05:34 PM

So installed.

Quote:

Originally Posted by trafix
Nice job :) ..... now if my forum had some thread ... lol

I?m in pre-launch and have 3 article bots posting day n night:) Let?s see whos most popular:D

Marco van Herwaarden 02-27-2005 07:56 AM

Quote:

Originally Posted by Romeos Tune
Sorry about that..... I am running 1.13 and getting database errors when running the cronscript:

Invalid SQL: SELECT * FROM vb3_threadoftheweekpolloption
WHERE threadofweekrulesid = 1
mysql error: Table 'vb.vb3_threadoftheweekpolloption' doesn't exist

mysql error number: 1146

It's inserting and extra vb into the table name for whatever reason.

Did you start with version 1.13, or did you upgrade from an older version (if upgrade, did you run the upgrade script?).

What do you mean with the "extra vb"? "vb is probably your databasename and "vb3_" your table prefix.


All times are GMT. The time now is 09:50 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
  • Page Generation 0.01514 seconds
  • Memory Usage 1,849KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete