Results 1 to 16 of 16

Thread: a sticy post in CMPS

  1. #1

    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. #2
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    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 03:02 PM.

  3. #3
    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. #4

    Default Re: a sticy post in CMPS

    thank you so much, i was looking for this

  5. #5

    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. #6
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    Default Re: a sticy post in CMPS

    The code that I posted above.

  7. #7

    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. #8
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    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. #9

    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. #10
    Senior Member tormodg's Avatar
    Join Date
    Oct 2004
    Posts
    114

    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. #11

    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 10:06 AM.

  12. #12

    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 10:05 AM. Reason: Added error.

  13. #13
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    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. #14

    Default Re: a sticy post in CMPS

    Why is my script have "postdateline" instead of "thread.dateline" - does it matter?

  15. #15
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    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. #16

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •