vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 08-03-2004, 04:02 AM
hani hani is offline
Member
 
Join Date: Jul 2004
Posts: 87
Default a sticy post in CMPS

Hi
I made one post sticky in CMPS news forum, so it will show always as news # 1, but when I added posts to the forum, it bushed the sticky post down in the cmps page.

How can I keep that post always the first?

and BTW, what is the difference between CMPS and Frontpages hacks?


Thanx

Hani
  #2  
Old 08-03-2004, 09:07 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: a sticy post in CMPS

To have your sticky threads displayed first, open your forum/modules/news.php file and look for:

PHP Code:
            ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC 
Replace that with:

PHP Code:
            ORDER BY sticky DESCthread.dateline DESC 
As for the differences - http://vbadvanced.com/forum/search.php - CMPS homepage differences

Last edited by Brian; 03-10-2005 at 02:02 PM.
  #3  
Old 08-05-2004, 12:55 AM
pdatotaal pdatotaal is offline
Rollercoaster junkie
 
Join Date: Jan 2004
Location: Holland (temp Canada)
Posts: 78
Default Re: a sticy post in CMPS

Was looking voor de same! thanks, but if looks that is must be a option that you put on/off?
  #4  
Old 11-16-2004, 10:07 AM
Diver Diver is offline
Member
 
Join Date: Jun 2004
Posts: 40
Default Re: a sticy post in CMPS

thank you so much, i was looking for this
  #5  
Old 12-19-2004, 03:41 PM
dleblanc dleblanc is offline
CajunLe
 
Join Date: Dec 2004
Posts: 46
Default Re: a sticy post in CMPS

Quote:
Originally Posted by Brian
To have your sticky threads displayed first, open your forum/modules/news.php file and look for:

" . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . "

Replace that with:

sticky DESC,


As for the differences - http://vbadvanced.com/forum/search.php - CMPS homepage differences
I look this up and it has " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " already in the news.php. So what needs to be replace where to keep the sticky on the top of the Center Block on the CMPS.
  #6  
Old 12-19-2004, 03:42 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: a sticy post in CMPS

The code that I posted above.
  #7  
Old 12-19-2004, 07:47 PM
dleblanc dleblanc is offline
CajunLe
 
Join Date: Dec 2004
Posts: 46
Default Re: a sticy post in CMPS

Brian
I'm not sure I am understanding you correctly because I am still new at this. Below is what I done and it seems to work, is this correct.

orginal infomation:
" . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC"

Change to:
" . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " sticky DESC"
  #8  
Old 12-20-2004, 10:39 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: a sticy post in CMPS

No... Look for the first bit of code mentioned in that post and then just replace it with sticky DESC.
  #9  
Old 12-20-2004, 03:20 PM
dleblanc dleblanc is offline
CajunLe
 
Join Date: Dec 2004
Posts: 46
Default Re: a sticy post in CMPS

Sorry, I'm a little slow but I thinks I finally understood. This is what I done I replaced:

ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC" . iif($vboptions['shownewsattach'], ', attachmentid') . "

ORDER BY sticky DESC, postdateline DESC" . iif($vboptions['shownewsattach'], ', attachmentid') . "

Sometimes we need a little more help, but I really do appreicated the time you give us...I for one would be lost. Each time I come across one more bridge to figure out I am getting better.
  #10  
Old 12-21-2004, 05:57 PM
tormodg's Avatar
tormodg tormodg is offline
Senior Member
 
Join Date: Oct 2004
Posts: 111
Default Re: a sticy post in CMPS

Hm...no offense, but a statement like "replace bla bla bla with bla bla bla" is really straightforward...
__________________
Hypography - Science for Everyone
http://hypography.com/ - http://hypography.com/forums
  #11  
Old 12-21-2004, 08:07 PM
dleblanc dleblanc is offline
CajunLe
 
Join Date: Dec 2004
Posts: 46
Default Re: a sticy post in CMPS

No offense taken, some of us old geezers are slow when it comes to the new technology. Remember the old were mostly self taught in computer language, thrown to the wolfs sort of speaking when it came to computers. My 27 year career has been an EMT-Paramedic and I’m sure some of my medical teaching is straight forward and would sound Greek…unless you are Greek…no offense.

With all that bla bla bla it works…I know, I know straightforward…I’m learning. (ha)

Thanks all

Last edited by dleblanc; 12-22-2004 at 09:06 AM.
  #12  
Old 03-09-2005, 11:11 PM
oldengine oldengine is offline
Member
 
Join Date: Oct 2004
Posts: 39
Default Re: a sticky post in CMPS

Quote:
Originally Posted by tormodg
Hm...no offense, but a statement like "replace bla bla bla with bla bla bla" is really straightforward...
I don't think it's clear at all. Especially when it has a gob of punctuation around it and it produces a database error.

Code:
// mod for sticky news
//                      ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC
                        ORDER BY sticky DESC, postdateline DESC
// end mod
So, I must have missed something?

Code:
Database error in vBulletin 3.0.7:

Invalid SQL: 
			SELECT IF(votenum >= 5, votenum, 0) AS votenum, IF(votenum >= 5 AND votenum != 0, votetotal / votenum, 0) AS voteavg,
			thread.threadid, thread.title, replycount, postusername, postuserid, thread.dateline AS postdateline, thread.lastposter, thread.lastpost, IF(views<=replycount, replycount+1, views) AS views, forumid, post.postid, pagetext, allowsmilie
			
  		,thread.iconid AS threadiconid, iconpath AS threadiconpath 
  		 
  		, NOT ISNULL(subscribethread.subscribethreadid) AS subscribed  
  		
			FROM thread AS thread
			LEFT JOIN post AS post ON (post.postid = thread.firstpostid) 
  		LEFT JOIN icon USING (iconid)

Last edited by oldengine; 03-10-2005 at 09:05 AM. Reason: Added error.
  #13  
Old 03-10-2005, 09:37 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: a sticy post in CMPS

I just modified the original post to include the whole line, so that should help to prevent someone from looking for/changing the code incorrectly.
  #14  
Old 03-10-2005, 11:56 AM
oldengine oldengine is offline
Member
 
Join Date: Oct 2004
Posts: 39
Default Re: a sticy post in CMPS

Why is my script have "postdateline" instead of "thread.dateline" - does it matter?
  #15  
Old 03-10-2005, 02:02 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: a sticy post in CMPS

I think I accidentally copied that from a different file that I was working on. Just leave thread.dateline in there as that should work better anyways.
  #16  
Old 03-10-2005, 03:23 PM
oldengine oldengine is offline
Member
 
Join Date: Oct 2004
Posts: 39
Default Re: a sticy post in CMPS

I'm sorry for the confusion on this modification.

I like to place comments where I modify files, but in this case, those //comments were interfering with the script and thus caused the sql database error.

All sorted out and working now.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latest Topics: how to direct to last post instead of thread apokalupsis Troubleshooting / "How do I..." Questions 2 07-26-2004 12:32 PM
Help with IMG Tag parse on vBadvanced CMPS Atomic Fireball Add-On Modules & Modifications 1 07-14-2004 09:57 PM
My cmps page went nuts with strange fonts Raitsa Troubleshooting / "How do I..." Questions 8 07-05-2004 02:49 AM
Just installed CMPS...cant access vbadvance cp baptizer Troubleshooting / "How do I..." Questions 4 07-03-2004 08:22 PM


All times are GMT -4. The time now is 06:32 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.