View Full Version : Each Announcement shows as an extra thread in Forumdisplay
Xenon
07-02-2002, 10:00 PM
Ok, this Hack shows each Announcement in forumdisplay, instead of just the newest one.
Also, if you make the Template-changes, you won't see all Announcements, if you click on just one.
Requested at vbulletin-germany.com
Should work with all vb2.2.x version, tested at 226 and 225
Xenon
07-03-2002, 01:10 PM
screenshot:
NTLDR
07-03-2002, 01:24 PM
Nice hack Xenon.
/me Installs Now *
Logician
07-03-2002, 01:38 PM
nice job pal :) IMO it should be default vb behaviour.
Atian
07-03-2002, 02:03 PM
*Atian hits install*
nice hack,i like it =)
Xenon
07-03-2002, 02:49 PM
Thanx pal :)
maybe we should tell the developers? ;)
@all: please download the file again, i have made a little mistake in the announcement.php section
small, but important ;)
Kars10
07-03-2002, 03:27 PM
Hi Xenon!!
Since 2 Weeks i?ve searched for this!!
This make announcements so much effectiv!!
Very easy install - works like a charm!! [clicked install] !! ;)
xware
07-03-2002, 04:23 PM
Great hack,thank you.
It SHOULD be standard behaviour, which only makes your hack all the more needed Xenon. :D
Why there isn't at least an option to do that in vBulletin is one of the bigger design flaws the board has - but with a great board, the biggest mistakes are still small. ;)
Xenon,
Great hack! One of the first things I noticed when I purchased vBulletin was the lack of the ability to do this. Kudos.
As far as making it the standard behavior in vBulletin, I think it should be an option. I.e. When creating a new announcement, have a checkbox to make it appear as a separate thread. That way announcements that have a higher level of importance appear as a separate thread, but others can be grouped together. This is especially important for a forum with a large number of announcements.
Paul
MalaK_3araby
07-11-2002, 01:03 AM
eXcellent .. --- INSTALLED -- thanX
Smoothie
07-11-2002, 04:02 AM
In forumdisply_announcement template, I find more than one instance of this:<a href="announcement.php?s=$session[sessionhash]&forumid=$foruminfo[forumid]">
Replace all?
Xenon
07-11-2002, 07:41 AM
yes, replace all
Smoothie
07-11-2002, 08:56 AM
thanks..nice addition. Never could figure out why announcements were never like that in the first place. :)
X-Fan
07-12-2002, 02:36 AM
Quick question - is it possible to integrate this with Xelation's "Detach Announcement" template mod from vBulletinTemplates.com?
Xenon
07-12-2002, 11:49 AM
i have to say: no idea, i don't know xelations Detach template mod.
but as i know in vb nearly everything is possible, so i think you can integrate it, but i'm not sure...
TheSaint-AeD
09-29-2002, 03:03 PM
Thx 4 the Hack, I searched long for this. Also imo this should be a standart Feature to vB.
themonarch
10-15-2002, 04:09 PM
Most excellent hack! Thanks a bunch!
Bison
10-16-2002, 01:09 AM
Good work M8! :banana:
Medivith
12-18-2002, 09:50 PM
vB2.2.9
The hack works as it should, but when I click on an annoucement I get this:
Parse error: parse error in /announcement.php on line 42
Line 42 is this:
WHERE startdate<='$datenow' AND enddate>='$datenow' AND $forumlist $announcementsql ORDER BY startdate DESC");
Xenon
12-18-2002, 09:58 PM
there is no error in this line, seems like you have made a mistake whil installing.
restart with a fresh announcment.php, be carefull that you modifications don'T affect other lines as the given ones..
if it doesn't work, next time post somme lines before and after the errorproducing line too. This would help.
Medivith
12-18-2002, 10:23 PM
Tried again, and had someone else check the install. First one looked fine to him.
Installed it again with a fresh annoucement.php, same error.
Lines 37-44 w/o the // comments
LEFT JOIN userfield ON userfield.userid=announcement.userid
".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid LEFT JOIN customavatar ON customavatar.userid=announcement.userid","")."
WHERE startdate<='$datenow' AND enddate>='$datenow' AND $forumlist $announcementsql ORDER BY startdate DESC");
while ($post=$DB_site->fetch_array($announcements)) {
Xenon
12-18-2002, 10:36 PM
well there is no error in that line...
post the lines 32 - 47 perhaps i can found out....
Medivith
12-18-2002, 11:03 PM
Want me to just e-mail you the annoucement.php file?
Might be easier.
Xenon
12-19-2002, 10:49 PM
have answered your mail.
as i said you didn't follow the instuctions properly
you can'T add comments before the codemodifications, if the mods are within a string....
Smoothie
12-20-2002, 01:01 AM
A slight variation on this hack:
http://www.macfora.com/forums/forumdisplay.php?s=&forumid=46
Boofo
12-20-2002, 01:49 AM
Originally posted by Smoothie
A slight variation on this hack:
http://www.macfora.com/forums/forumdisplay.php?s=&forumid=46
Ok, Smoothie, let's give up the secret now. :) How'd you do it? :)
Dean C
12-20-2002, 08:32 AM
Don't quote me but i would have said he installed Xelations template mod over at vbT - then installed this hack :)
- miSt
Smoothie
12-20-2002, 09:30 AM
Right-O
Dean C
12-20-2002, 10:48 AM
Hehe im so clever ;)
You have msn or AIM smoothie-o?
- miSt
Smoothie
12-20-2002, 01:32 PM
Originally posted by Mist
Hehe im so clever ;)
You have msn or AIM smoothie-o?
- miSt Yes, both.
Dean C
12-20-2002, 02:03 PM
You have a PM ^
Xenon
12-20-2002, 03:36 PM
Looks nice smoothie :)
Medivith
12-20-2002, 08:08 PM
Originally posted by Xenon
have answered your mail.
as i said you didn't follow the instuctions properly
you can'T add comments before the codemodifications, if the mods are within a string....
ahh crap. Thanks man. Great hack.
Smoothie
12-20-2002, 09:19 PM
Originally posted by Xenon
Looks nice smoothie :) Thanks! excellent hack.
Xenon
12-20-2002, 09:20 PM
thanks both of you :)
Boofo
12-20-2002, 09:34 PM
No, thank YOU. ;)
rstark
01-16-2003, 06:45 AM
Ok, I installed this hack, but when the user clicks on an announcement, I'd rather have them see all anouncements so I only modified forumdisplay.php. Nice work though, I've been waiting for this for a while now.
vintagerv
04-12-2003, 12:11 PM
This is the first hack I've installed and I'm very uncomfortable working in PHP. But it was easy and it works great. Thanks a million.
Xenon
04-12-2003, 12:40 PM
* Xenon enjoys to hear that :)
WEForums
04-13-2003, 07:02 PM
Strangely enough, in the edit "announcement.php" I cannot find most of the "find this" parts. I think I could only find the first one.
I am using 2.3.0...hmm...can't remember if I edited the announcement.php file or not...I don't remember doing it.
Xenon
04-14-2003, 03:46 PM
i think announcement.php has changed during the versions, for vb226 it worked.
you have to try to find similar parts in the code and apply the cahnges manually
sraposa
04-30-2003, 02:23 PM
exactly what i needed. my first installed hack and it took 15 minutes and worked immediately.
my only technical note is that i installed on 2.3.0 and noticed that there was a minor discrepancy in the instructions for hacking announcements.php:
the hack says to look for:
$getperms=getpermissions($foruminfo[forumid]);
if (!$getperms[canview]) {
eval("standarderror(\"".gettemplate("error_nopermission")."\");");
exit;
}
but my announcements.php showed:
$getperms=getpermissions($foruminfo[forumid]);
if (!$getperms[canview]) {
show_nopermission();
}
looks like they cleaned up the code a little -- or maybe this has something to do with the skin i have installed? in any case, i rubbed a couple of brain cells together and simply added the new code below as instructed and it seems fine.
thanks!
-scott
Xenon
04-30-2003, 07:59 PM
yeah i know, it was a bugfix
at least i was the one who reported it ;)
i'll update the instructions in the future time ;)
Xenon
05-01-2003, 05:59 PM
well ok, have updated the instructions today to fit vb2.3.0 :)
sraposa
05-01-2003, 06:46 PM
well, on behalf of future hack installers, i thank you. ;)
on a related note, i just realized today that many of the most popular hacks on this site don't officially support 2.3.0. i wonder why that is? is 2.3.0 that new? i guess it is, in the larger scheme of things. it's just odd that as a new vBulletin user, i come here and see that most of the activity seems to have somewhat died down when you get to the more recent versions of vB.
-s
Xenon
05-01-2003, 06:52 PM
well at first, yes vb230 is really new :)
then second, the version number jsut means for which vb version the hack is written, but normally the also work with newer versions :)
you can't force every author to update every hack he releases whenever a new vb version is released ;)
OmaniMan
05-04-2003, 09:52 PM
Really Wonderful ....
I was thinking about this hack since my friend wanted to add more than one annoucment as a seperate ...
wish you the best man
GaleForce
05-04-2003, 09:56 PM
Awesome hack! I was looking for something just like this :D
jamoss
07-01-2003, 02:34 AM
Perfect! Just what I was looking for. Much thanks.
Oblivion Knight
07-01-2003, 07:20 AM
I've always said that this should have been default behaviour..
I didn't know someone had released a mod that actually made it do it..!
Just what I was looking for, thanks Xenon :)
msimplay
08-08-2003, 02:09 AM
Yep works great on vb2.3 erm ooh no i hacked my forum to bits and now 2.3.1 is out :(
ANT.menmusic
08-19-2003, 04:13 AM
not even 10 minutes for this one and boom - worked like a charm. using 2.2.9
:smoke:in'
-ant
Angelus
10-25-2003, 10:50 AM
ich habe diesen prima hack mal versucht in mein 2.2.9 einzubauen aber irgendwie geht das nicht so wie es soll.
ich habe in meiner forumdisplay.php einen ganzanderen code :(
siehe:
if ($announcement=$DB_site->query_first("SELECT announcementid,startdate,title,user.username,user. userid,user.usertitle,user.customtitle
FROM announcement
LEFT JOIN user
ON user.userid=announcement.userid
WHERE startdate<=$datenow AND enddate>=$datenow
AND $forumlist
ORDER BY startdate DESC
LIMIT 1")
and (!isset($pagenumber) or $pagenumber<2)) {
und im board kommt dann ein fehler:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\board\admin\db_mysql.php on line 154
bitte hleft mir ich weis nicht was da schief l?uft?
Xenon
10-26-2003, 02:10 PM
einfach diese if condition mit dem teil ersetzen:
$announcementbit="";
$announcements=$DB_site->query("SELECT announcementid,startdate,title,user.username,user. userid,user.usertitle,user.customtitle
FROM announcement
LEFT JOIN user
ON user.userid=announcement.userid
WHERE startdate<=$datenow AND enddate>=$datenow
AND $forumlist
ORDER BY startdate DESC");
while($announcement=$DB_site->fetch_array($announcements)) {
wenn du das fetch_array hernimmst, musst du aufpassen, das nur ein DB_site->query und kein query_first verwendet wird
Angelus
10-27-2003, 07:11 PM
ich habe deinen code mal eingebaut, es ist immernoch der gleiche fehler :( wie oben beschrieben, und in meiner forumdisplay.php sehe ich auch nur eine ank?ndigung obwohl ich mehrere eingestellt habe.
Xenon
10-28-2003, 06:21 PM
hmm, der teil kanns kaum sein, der stimmt nämlich, vielleicht haste woanders nen fehler reingebracht.
btw. auf vb-g in der hacksektion ist der hack auch drinnen, aber auf deutsch.
vielleicht hat da auch jemand das problem mal gehabt und gelöst (nur so als tip)
desiforums
09-01-2006, 10:31 PM
is it wrk for vbulletin 3.5.4
because i can't find
Open forumdisplay.php
find:
if ($announcement=$DB_site->query_first("SELECT announcementid,startdate,title,user.username,user. userid,user.usertitle,user.cus tomtitle
FROM announcement
LEFT JOIN user
ON user.userid=announcement.userid
WHERE startdate<=$datenow AND enddate>=$datenow
AND $forumlist
ORDER BY startdate DESC
LIMIT 1")) {
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.