YaBB SE Community

Development => Completed mods => Topic started by: [Unknown] on May 05, 2003, 12:14:35 PM

Title: [Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on May 05, 2003, 12:14:35 PM
I think I got miffed and said I wouldn't do this, but forget that.

This allows you to make forum-wide stickies.  It increases the topic count (but not post count!) of every board when posted, and even obeys the page-length rules.  (if you have 10 announcements, you're users'll be a little annoyed, but there will only be 10 topics under them.)

You can ONLY create one at post-time.  I'll probably add a button or something in a later release, but for now it's right above "Disable Smilies?".  Only administrators can do this.

Clicking the sticky button at the bottom will make the topic *FOREVER* not a sticky or announcement.  Deleting it will have the same effect.

Delete Posts Older Than XXX Days no longer deletes stickies with this mod installed.  Just doesn't make sense for it to, imho.

If you select the topics and click "next" or "previous", it will only do it for the board you posted the announcement on.  I don't see any clean way around this, so don't expect me to change it.

Package Server: http://unknown.network32.net
Package: http://unknown.network32.net/better/announcements.zip

Only for use with YaBB SE, PfaBB, or YaPP.  Not for use with ttForum or ttCMS.

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Nonya on May 06, 2003, 02:30:35 PM
Installed, tested & working fine without any probs  :)
Thanks Unknown  ;)
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Juvenall Wilson on May 07, 2003, 01:48:32 AM
Installed, but had to make a few changes to the mod file. I needed to add a space to everything that spaned more then one line

Example -
This -
Code: [Select]
      WHERE m.ID_MSG=t.ID_LAST_MSG
         AND t.ID_BOARD=$currentboard
      ORDER BY $stickyOrder m.posterTime DESC

Needed to be changed to this -
Code: [Select]
      WHERE m.ID_MSG=t.ID_LAST_MSG

         AND t.ID_BOARD=$currentboard

      ORDER BY $stickyOrder m.posterTime DESC

No biggie though. After making the adjustments, the mod installed perfectly and seems to be working with any problems! Great work! :D
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: CrazyC on May 07, 2003, 06:32:55 PM
Being that you granted permission to use this mod on PfaBB, I went ahead and made 2 minor changes and posted it on the PfaBB site.  As usual with conversions, all original information and credits are still intact with minor notes regarding the conversion giving myself credit.

I do feel obligated to let you know what I changed though.
1. One of the search strings in Post.php had different spacing in the PfaBB copy of Post.php.  (not sure why)
2. Needed to added 2 additional variables in the post sql query because of PfaBB's news features.
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Daniel D. on May 09, 2003, 10:14:11 AM
German:

Code: [Select]
$txt['sticky2_make'] = 'Ankündigung';
$txt['sticky2_lmake'] = 'Dieses Thema zur Ankündigung in allen Boards machen.';
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Dataforce on May 18, 2003, 11:31:15 AM
Quote
if you have 10 announcements, you're users'll be a little annoyed, but there will only be 10 topics under them.

You could do what vB have done, and put it all into one post ?
then no matter how many announcements there are it wil still only be 1 topic

not sure how muc work it would be to make it add at the top of the post and change subject etc to match the lastest announcement but i'm sure a good developer like you could do it ?

also, does the news.php (the nit that allows contents of a forum to be shown else where eg the main apge) show these announcements ?
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on May 18, 2003, 01:14:04 PM
Yes, it, SSI.php, and even recent posts will show it.

I don't think I would like the one topic method.  You could do that manually, say make a topic named "Announcements" and lock it - then just post replies.

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: James Bone on June 04, 2003, 09:39:49 AM
Why do i get this when trying to post a stickie?

Unknown column 'isSticky' in 'field list'
File: /home/netplus/public_html/forums/Sources/Post.php
Line: 956
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on June 04, 2003, 08:15:53 PM
Why do i get this when trying to post a stickie?

Unknown column 'isSticky' in 'field list'
File: /home/netplus/public_html/forums/Sources/Post.php
Line: 956

Ummm.... can you even sticky posts??  That field is kinda important to the whole sticky system...

Or maybe I made a typo.. I don't see it...

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: James Bone on June 05, 2003, 03:05:19 AM
Cant post stickies or announcement stickies with this mod installed. WHen i uninstall it i can make normal stickies ok ??? any ideas?

James
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: zoki on October 08, 2003, 04:24:38 PM
"The board field does not accept / in the query string"


Thats what I get when I try to go from board view to some post.


Even when I remove the pack, I still get the error msg.
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on October 08, 2003, 06:40:02 PM
I don't know what to tell you - this mod doesn't touch any of that.  And it doesn't touch the sticky field either...

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: EliteRides on December 06, 2003, 01:25:40 PM
"The board field does not accept / in the query string"
I had this problem also.  It's somewhere in the MessageIndex.php file.  I restored only this file and it fixed it, but still cannot get the mod to work?

Any fix for the below?
Code: [Select]
<edit file>
Sources/MessageIndex.php
</edit file>

<search for>
      WHERE m.ID_MSG=t.ID_LAST_MSG
         AND t.ID_BOARD=$currentboard
      ORDER BY $stickyOrder m.posterTime DESC
</search for>

<replace>
      WHERE m.ID_MSG=t.ID_LAST_MSG
         AND (t.ID_BOARD=$currentboard OR t.isSticky=2)
      ORDER BY $stickyOrder m.posterTime DESC
</replace>

<search for>
         if ($modSettings['enableStickyTopics'] == 1 && $isSticky == 1)
            $threadclass = 'sticky';
         if (($mstate == 1 || $mstate == 2 )&&($modSettings['enableStickyTopics'] == 1 && $isSticky == 1))
            $threadclass='lockedsticky';
</search for>

<replace>
         if ($modSettings['enableStickyTopics'] == 1 && $isSticky != 0)
            $threadclass = 'sticky';
         if (($mstate == 1 || $mstate == 2 )&&($modSettings['enableStickyTopics'] == 1 && $isSticky != 0))
            $threadclass='lockedsticky';
</replace>

<search for>
      $result = mysql_query("
         SELECT t.ID_LAST_MSG, t.ID_TOPIC, t.numReplies, t.locked, m.posterName, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterDisplayName, t.numViews, m.posterTime, m.modifiedTime, t.ID_FIRST_MSG, t.isSticky, t.ID_POLL, m2.posterName as mname, m2.ID_MEMBER as mid, IFNULL(mem2.realName, m2.posterName) AS firstPosterDisplayName, m2.subject as msub, m2.icon as micon, IFNULL(lt.logTime, 0) AS isRead, IFNULL(lmr.logTime, 0) AS isMarkedRead
         FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}messages as m2
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
            LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER)
            LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC=t.ID_TOPIC AND lt.ID_MEMBER=$ID_MEMBER)
            LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD=$currentboard AND lmr.ID_MEMBER=$ID_MEMBER)
         WHERE t.ID_TOPIC IN (" . implode(',', $topics) . ")
            AND m.ID_MSG=t.ID_LAST_MSG
            AND m2.ID_MSG=t.ID_FIRST_MSG
         ORDER BY $stickyOrder m.posterTime DESC") or database_error(__FILE__, __LINE__);
</search for>

<replace>
      $result = mysql_query("
         SELECT t.ID_LAST_MSG, t.ID_TOPIC, t.numReplies, t.locked, m.posterName, m.ID_MEMBER, IFNULL(mem.realName, m.posterName) AS posterDisplayName, t.numViews, m.posterTime, m.modifiedTime, t.ID_FIRST_MSG, t.isSticky, t.ID_POLL, m2.posterName as mname, m2.ID_MEMBER as mid, IFNULL(mem2.realName, m2.posterName) AS firstPosterDisplayName, m2.subject as msub, m2.icon as micon, IFNULL(lt.logTime, 0) AS isRead, IFNULL(lmr.logTime, 0) AS isMarkedRead
         ,t.ID_BOARD
         FROM {$db_prefix}topics as t, {$db_prefix}messages as m, {$db_prefix}messages as m2
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER=m.ID_MEMBER)
            LEFT JOIN {$db_prefix}members AS mem2 ON (mem2.ID_MEMBER=m2.ID_MEMBER)
            LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC=t.ID_TOPIC AND lt.ID_MEMBER=$ID_MEMBER)
            LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD=t.ID_BOARD AND lmr.ID_MEMBER=$ID_MEMBER)
         WHERE t.ID_TOPIC IN (" . implode(',', $topics) . ")
            AND m.ID_MSG=t.ID_LAST_MSG
            AND m2.ID_MSG=t.ID_FIRST_MSG
         ORDER BY $stickyOrder m.posterTime DESC") or database_error(__FILE__, __LINE__);
</replace>

<search for>
            $new = '<a href="' . $cgi . ';action=display;threadid=' . $mnum . ';start=new">' . $img['new'] .'</a>';
</search for>

<replace>
            $new = '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . 'action=display;threadid=' . $mnum . ';start=new">' . $img['new'] .'</a>';
</replace>

<search for>
               $tmppages[] = "<a href=\"$cgi;action=display;threadid=$mnum;start=$tmpb\">$tmpa</a>";
</search for>

<replace>
               $tmppages[] = "<a href=\"$scripturl?board=$row[ID_BOARD];action=display;threadid=$mnum;start=$tmpb\">$tmpa</a>";
</replace>

<search for>
                  <font size="2"><a href="' . $cgi . ';action=display;threadid=' . $mnum . '">' . $msub . '</a> ' . $new . ' ' . $pages . '</font></td>
</search for>

<replace>
                  <font size="2"><a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . 'action=display;threadid=' . $mnum . '">' . $msub . '</a> ' . $new . ' ' . $pages . '</font></td>
</replace>
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on December 07, 2003, 01:02:40 AM
I see it.  Twice.  I'm good at typos :P.

$new = '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . 'action=display;threadid=' . $mnum . ';start=new">' . $img['new'] .'</a>';

Should be:
$new = '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . ';action=display;threadid=' . $mnum . ';start=new">' . $img['new'] .'</a>';

<font size="2"><a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . 'action=display;threadid=' . $mnum . '">' . $msub . '</a> ' . $new . ' ' . $pages . '</font></td>
</replace>


Should be:
<font size="2"><a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . ';action=display;threadid=' . $mnum . '">' . $msub . '</a> ' . $new . ' ' . $pages . '</font></td>
</replace>


-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Forbiden] on December 10, 2003, 03:48:20 PM
the link does not work for me it gives me an error.
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on December 10, 2003, 10:11:07 PM
Sorry, all my mods are down for the moment.

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Black Hawk on December 11, 2003, 03:33:59 PM
Ick, and this looks really good like PHPBB....
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on December 12, 2003, 09:15:06 PM
Ick, and this looks really good like PHPBB....

Again, sorry.  It happens, they are gone.  Got deleted by the friend I was hosting with.

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Black Hawk on December 13, 2003, 10:30:19 AM
Hmmm..... maybe wanna send it with an attachment to me, because it seems really really cooool!
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Black Hawk on December 13, 2003, 11:09:00 AM
I'll be able to host it for you. Not on free website crap. On the real paid-for stuff. ;D
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Black Hawk on December 21, 2003, 05:24:07 PM
Well, yeah, I am willing, if you want...
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on December 21, 2003, 06:59:43 PM
No, let me rephrase - it's gone.  I don't have it on hand.

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Black Hawk on December 22, 2003, 06:39:50 PM
You mean non-existant anymore? If so...... :-[ :-[ :-[ :-[ :-[
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Anguz on December 22, 2003, 11:03:14 PM
at least not in his hands... there's people that downloaded it, so we you can only wait for someone to offer it

I'd be happy to host [Unknown]'s mods, but I need ppl to send them to me first  :-\
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: Black Hawk on December 23, 2003, 03:38:01 PM
I'll be able to host it for you. Not on free website crap. On the real paid-for stuff. ;D


Did I get you first? ;) Anyhow, maybe anybody else willing??
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: FaSan on January 19, 2004, 08:55:36 PM
This is a Big MOD !!!

But... the link is not work...  :-\ :'(
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: FaSan on February 01, 2004, 08:27:35 AM
 :'( :'( :'(
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: [Unknown] on February 01, 2004, 02:08:30 PM
Have fun.

http://www.yabbse.org/community/attachments/announcements.zip (http://www.yabbse.org/community/attachments/announcements.zip)

-[Unknown]
Title: Re:[Beta 1.5.2] Announcement Stickies 1.0
Post by: FaSan on February 01, 2004, 07:22:03 PM
Great !!!  :-* :-* :-*