The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]()
I think i got it...
Code:
// ############################### start do set on frontpage ############################### if ($_POST['onfrontpage'] != $threadinfo['onfrontpage']) { if($threadinfo['onfrontpage'] == '1') { $value = '0'; } else { $value = '1'; } $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET onfrontpage = $value WHERE threadid = $threadid"); $_REQUEST['forceredirect'] = 1; $url = "showthread.php?$session[sessionurl]t=$threadid"; eval(print_standard_redirect('redirect_openclose')); } |
#12
|
|||
|
|||
![]()
Ah yup, make the value 0 instead of blank.. congrats
![]() |
#13
|
|||
|
|||
![]()
thank you man, you are my hero
![]() One last thing but i think i can figure that out on my own. The thread tools always has "close thread" or "open thread" as a default. (because it's a radio button) That means if i select 'to frontpage' it automatically selects 'close' or 'open' and that's quite annoying ![]() |
#14
|
|||
|
|||
![]()
One last thing: I try to get the first post of each thread marked with "onfrontpage" out of the database. Iam using the following query but i doesn't work
![]() Code:
$getnews = $DB_site->query(" ## GET LATEST THREADS ## SELECT thread.*,thread.iconid AS threadiconid $previewfield FROM ".TABLE_PREFIX."thread AS thread LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread') LEFT JOIN ".TABLE_PREFIX."post AS post ON(thread.threadid = post.threadid) $previewjoin WHERE open = '1' AND forumid NOT IN (0$limitfids) AND onfrontpage = '1' AND thread.visible = '1' AND deletionlog.primaryid IS NULL ORDER BY lastpost DESC LIMIT 10"); while($news = $DB_site->fetch_array($getnews)) { Code:
Database error in vBulletin 3.0.0 Release Candidate 4: Invalid SQL: ## GET LATEST THREADS ## SELECT thread.*,thread.iconid AS threadiconid , post.pagetext AS preview FROM thread AS thread LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread') LEFT JOIN post AS post ON(thread.threadid = post.threadid) LEFT JOIN post AS post ON(post.postid = thread.firstpostid) WHERE open = '1' AND forumid NOT IN (0) AND onfrontpage = '1' AND thread.visible = '1' AND deletionlog.primaryid IS NULL ORDER BY lastpost DESC LIMIT 10 mysql error: Not unique table/alias: 'post' mysql error number: 1066 Date: Friday 27th of February 2004 04:20:26 PM Script: http://xxx/232/new.php Referer: Username: MrNase IP Address: xx.xxx.0.xx |
#15
|
||||
|
||||
![]() Quote:
I guess the second left join comes form $previewjoin. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|