Welcome, Guest. Please Login or Register.
November 27, 2024, 10:32:18 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Beta 1.5.2] Announcement Stickies 1.0 « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: [Beta 1.5.2] Announcement Stickies 1.0  (Read 20731 times)
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
[Beta 1.5.2] Announcement Stickies 1.0
« on: May 05, 2003, 05:14:35 PM »
Reply with quote

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]
Logged
Nonya
Beta Tester
Sr. Member
****
Posts: 375


YaBBse Developer Wannabe!

ICQ - 172862020nonya69rs@hotmail.com WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #1 on: May 06, 2003, 07:30:35 PM »
Reply with quote

Installed, tested & working fine without any probs  :)
Thanks Unknown  ;)
Logged

Juvenall Wilson
Full Member
***
Posts: 162


Eat more vegetarians

ICQ - 83740832switchTone@hotmail.com
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #2 on: May 07, 2003, 06:48:32 AM »
Reply with quote

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 -
      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 -
      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
Logged

CrazyC
Jr. Member
**
Posts: 85


My name says enough.

WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #3 on: May 07, 2003, 11:32:55 PM »
Reply with quote

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.
Logged

CrazyC
Daniel D.
Mod Team
YaBB God
*****
Posts: 2935


Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #4 on: May 09, 2003, 03:14:11 PM »
Reply with quote

German:

$txt['sticky2_make'] = 'Ankündigung';
$txt['sticky2_lmake'] = 'Dieses Thema zur Ankündigung in allen Boards machen.';
Logged

Dataforce
Full Member
***
Posts: 171


Data-Host.co.uk

Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #5 on: May 18, 2003, 04:31:15 PM »
Reply with quote

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 ?
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #6 on: May 18, 2003, 06:14:04 PM »
Reply with quote

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]
Logged
James Bone
Jr. Member
**
Posts: 62


Fly Baby........Fly

WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #7 on: June 04, 2003, 02:39:49 PM »
Reply with quote

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
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #8 on: June 05, 2003, 01:15:53 AM »
Reply with quote

Quote from: James Bone on June 04, 2003, 02:39:49 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]
Logged
James Bone
Jr. Member
**
Posts: 62


Fly Baby........Fly

WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #9 on: June 05, 2003, 08:05:19 AM »
Reply with quote

Cant post stickies or announcement stickies with this mod installed. WHen i uninstall it i can make normal stickies ok ??? any ideas?

James
Logged

zoki
Noobie
*
Posts: 40


Have you seen me offline?

ICQ - 46742125
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #10 on: October 08, 2003, 09:24:38 PM »
Reply with quote

"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.
Logged

All your psychedelics are belong to us!
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #11 on: October 08, 2003, 11:40:02 PM »
Reply with quote

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]
Logged
EliteRides
Jr. Member
**
Posts: 83


EliteRides.com

WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #12 on: December 06, 2003, 06:25:40 PM »
Reply with quote

Quote from: zoki on October 08, 2003, 09:24:38 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?
<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>
Logged

[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #13 on: December 07, 2003, 06:02:40 AM »
Reply with quote

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]
Logged
[Forbiden]
Jr. Member
**
Posts: 54


"Every story has its ending"

Re:[Beta 1.5.2] Announcement Stickies 1.0
« Reply #14 on: December 10, 2003, 08:48:20 PM »
Reply with quote

the link does not work for me it gives me an error.
Logged

Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Beta 1.5.2] Announcement Stickies 1.0 « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.051 seconds with 20 queries.