![]() |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
To have your sticky threads displayed first, open your forum/modules/news.php file and look for:
PHP Code:
PHP Code:
Last edited by Brian; 03-10-2005 at 02:02 PM. |
|
#3
|
|||
|
|||
|
Was looking voor de same! thanks, but if looks that is must be a option that you put on/off?
|
|
#4
|
|||
|
|||
|
thank you so much, i was looking for this
|
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
The code that I posted above.
|
|
#7
|
|||
|
|||
|
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
|
||||
|
||||
|
No... Look for the first bit of code mentioned in that post and then just replace it with sticky DESC.
|
|
#9
|
|||
|
|||
|
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
|
||||
|
||||
|
Hm...no offense, but a statement like "replace bla bla bla with bla bla bla" is really straightforward...
__________________
Hypography - Science for Everyonehttp://hypography.com/ - http://hypography.com/forums |
|
#11
|
|||
|
|||
|
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
|
|||
|
|||
|
Quote:
Code:
// mod for sticky news
// ORDER BY " . iif($vboptions['stickynewsthreads'], 'sticky DESC,') . " postdateline DESC
ORDER BY sticky DESC, postdateline DESC
// end mod
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
|
||||
|
||||
|
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
|
|||
|
|||
|
Why is my script have "postdateline" instead of "thread.dateline" - does it matter?
|
|
#15
|
||||
|
||||
|
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
|
|||
|
|||
|
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 | |
|
|
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 |