View Full Version : Forum Announcement(s) on CMPS
This adds the latest announcement(s) to vBadvanced CMPS from a specific or multiple forums.
You will need to edit $sqltext within announcements.php depending on how you want to use it. Read note inside of file for more information.
BB Code, Smilies, and HTML are parsed per announcement settings.
Follow instructions in text file :)
pdatotaal
09-19-2004, 10:07 PM
Super big thanks Shon !! You are my hero now! So far it works but have something that you maby can help.
If I go to ..adv_index.php?page=psion the $forumid must be = 63
If I go to adv_index.php?page=Pocketpc the $forumid must be = 70
and more.. How can I make that in the announements.php?
Super big thanks Shon !! You are my hero now! So far it works but have something that you maby can help.
If I go to ..adv_index.php?page=psion the $forumid must be = 63
If I go to adv_index.php?page=Pocketpc the $forumid must be = 70
and more.. How can I make that in the announements.php?
Right off hand, I'm not sure about each page... if it's not added in the next version or if there is a big demand for it, I may try to add it on to the admin cp options... but I think you said one time that each usergroup would see a different announcement or something. So if that is the case, you could do the following:
In announcements.php find the line that begins:
$forumid =
and replace with:
if ($bbuserinfo[usergroupid]==XX)
{
$forumid = "XX";
}
elseif ($bbuserinfo[usergroupid]==XX)
{
$forumid = XX;
}
Repeat this directly after for as many usergroups as you would like.
elseif ($bbuserinfo[usergroupid]==XX)
{
$forumid = XX;
}
But other than that right now... I'm not really sure about. I'm only showing announcements on one page with announcements per usergroup. So I didn't really get deep in it ;x
pdatotaal
09-19-2004, 10:41 PM
Ok I understand, I will try something. I just wonder how you can look wat ?page= is. Maybe Brian knows;-)
Thanks for the help so far.. I am really happy. Now I can do something.. Only one thing I must find out and that is if there is a way to use the WYSIWYG editor with Announcement(s)..
pdatotaal
09-24-2004, 08:38 PM
Get it working like this
if ($getpage==psion)
{
$forumid = 63;
}
elseif ($getpage==pocket)
{
$forumid = 39;
}
But is there a way to put $forumid = # in a template?
I don't think so :(
If there were more people interested in this, I would probably try to put it in with the CMPS settings per page... but it seems like you're the only one interested ;x
pdatotaal
09-25-2004, 11:32 AM
, I would probably try to put it in with the CMPS settings per page... but it seems like you're the only one interested ;x
Shame! but ok so far works for me and I am very happy.:D Thanks..
I now discover what I can do alll with this!! I hope that other people find this also.. Moderators can now make there own complet webpages... Without my help.. That save time for me...
So thanks again Shon!! (and sorry for my bad Englisch)
Fargo
10-06-2004, 10:14 AM
Great job, Shon - this is the very thing I've been waiting for!
This adds the latest announcement(s) to vBadvanced CMPS from a specific or multiple forums.
You will need to edit $sqltext within announcements.php depending on how you want to use it. Read note inside of file for more information.
Hi there, cud someone kindly explain what exactly i need to configure in the
the following code. I have 3 parent forums with 2-3 sub forum for each parent.
thanks
======
//In order to display announcements from different forums
//You will need to change $sqltext to the following...
//Multiple Forums ($forumid = "1,2,3";)
//$sqltext = "forumid IN($forumid)";
//Single Forum - not including parent forums ($forumid = 1;)
//$sqltext = "forumid = $forumid";
//Single Forum - including parent forums ($forumid = 1;)
//$sqltext = fetch_forum_clause_sql($forumid, 'forumid');
//------------------------------------------------------------------------
// begin configuration
//------------------------------------------------------------------------
anyone who cud help here... :(
Parse error: parse error, unexpected ',' in /hsphere/local/home/vikram/thalforum.com/forums/modules/announements.php on line 23
HHHHHHHHEEEEEEEEELLLLLLLLLP
Spydey
01-14-2005, 11:22 PM
Did you ever figure it out?
I just implemented the code - I really like - nice and simple...
It would be great if this was integrated more with AdminCP to make forum changes and choices - but that's way over my head...
BTW - the error is something in this line in the php file:
//Forum(s) to pull announcements from
$forumid = 1;
Post your php code down to:
//------------------------------------------------------------------------
// end configuration - no other changes necessary
//------------------------------------------------------------------------
I know this was 2 months ago - but you never know if you still need help...
dleblanc
01-15-2005, 04:00 PM
Currently I have the Annoucement working on the CMPS page by setting up in the forums CP under Annoucements and placing under one forums catagory. My question is how can you put the annoucement in every forums catagory and still be able to refrence the CMPS annoucment to open up and view it completley if you so desire? Basicly if I just make it Global and not assign any one forum but choose to put in All Forums it will show up on the CMPS page but not refrence back to any one catagory or allow you to click on it without displaying a error. Does this make sense?
So how would I solve this issue.
Slave
01-17-2005, 04:05 AM
Currently I have the Annoucement working on the CMPS page by setting up in the forums CP under Annoucements and placing under one forums catagory. My question is how can you put the annoucement in every forums catagory and still be able to refrence the CMPS annoucment to open up and view it completley if you so desire? Basicly if I just make it Global and not assign any one forum but choose to put in All Forums it will show up on the CMPS page but not refrence back to any one catagory or allow you to click on it without displaying a error. Does this make sense?
So how would I solve this issue.
Yeah .. I've just noticed this too :(
Any help to get this fixed would be great .. :)
I'm also after a way of getting different announcements on different pages btw .. so if someone comes up with a way of getting that to work please let us all know ..
Thanks :)
Slave
01-23-2005, 07:59 PM
No one able to fix this problem with this module?
dleblanc
01-23-2005, 08:42 PM
I was waiting for a response but don't know if it can be fixed or not?
Slave
01-28-2005, 10:53 AM
Still waiting .. I can't believe no one else is having this issue with this module .. :(
Parse error: parse error, unexpected ',' in /hsphere/local/home/vikram/thalforum.com/forums/modules/announements.php on line 23
HHHHHHHHEEEEEEEEELLLLLLLLLP
I am ... no help yet!
Slave
01-28-2005, 11:04 AM
I'm afraid that's not the problem I'm having Viks ..
Looking at the error you're having I would go back and look at the code you inserted .. seems like there's an extra comma somewhere where it shouldn't be ..
Slave
01-28-2005, 11:06 AM
Which, given it's all in newly created templates, seems strange ..
Have you tried deleting the templates you created and starting again?
Slave
01-28-2005, 11:08 AM
Can you show what you have between ..
//------------------------------------------------------------------------
// begin configuration
//------------------------------------------------------------------------
and
//------------------------------------------------------------------------
// end configuration - no other changes necessary
//------------------------------------------------------------------------
Within your announements.php file ..
Slave
01-28-2005, 11:34 AM
Oh .. I've sort of fixed my problem .. (dleblanc take note) ..
Within "adv_portal_announcementbit"
Find both instances of:
$announcement[forumid]
and replace both with correct forum number .. ie 1
This will work if all you want to show are announcements which are forum wide .. ie you've ticked "All Forums" when creating the announcment ..
dleblanc
01-28-2005, 12:42 PM
Slave,
That work and also I noted that if you create an announcements and put it in a single forum and not All Forums it still will display Latest Announcements by overiding the All forums as the lastest announcements enter. Cool..... :cool:
:confused: What if you want to keep let say the last 3 announcements displayed is that possible?
Slave
01-28-2005, 12:54 PM
just edit your announcement.php file within your modules folder .. change ..
//How many announcements to display
$maxannouce = 1;
To whatever number of announcements you want to show ..
Remember that you have to have that many current announcements else you'll only get the number of current announcements showing .. (if that makes sense!) .. :)
Slave
01-28-2005, 12:55 PM
say ..
//How many announcements to display
$maxannouce = 3;
dleblanc
01-28-2005, 05:32 PM
:) Thanks I miss that one..guess that my Alzheimers kicking in again.
$maxannouce = 3;
trulylowcarb
02-09-2005, 01:38 AM
THANKS! Easy to install and use. Working great w/ vb 3.06 and CMPS1.01
TeamGoFast
02-12-2005, 11:06 AM
nice add on!! thanks for sharing!
ricoche
02-17-2005, 04:23 AM
THANKS! Easy to install and use. Working great w/ vb 3.06 and CMPS1.01
Wow, I have the same deal and followed the directions above, but the no announcements are pulled from the forums.
//Forum(s) to pull announcements from
$forumid = 92;
//How many announcements to display
$maxannouce = 1;
//How many characters to display per announcement
$maxchrs = 2000;
//Only change this by reference above
$sqltext = "forumid = $forumid";
Module has been added and the templates too. Everything has been configured, but still no go.
Thanks
Tom M
02-17-2005, 11:46 AM
One change I made was to modify the behaviour for when there are no announcements. The initial design still showed the banner of "Latest Announcement". With this change the block disappears completely if there aren't any current announcements.
At the end of announcements.php change
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_announcements') . '";');
To
if ($announcebits != '')
{
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_announcements') . '";');
}
Slave
02-20-2005, 03:21 AM
One change I made was to modify the behaviour for when there are no announcements. The initial design still showed the banner of "Latest Announcement". With this change the block disappears completely if there aren't any current announcements.
Ah ha! .. the last piece of the puzzle ..
Thanks Tom .. :)
Elleth Faewen
05-07-2005, 10:46 AM
I am about to try this. It looks like just what I need.
Parse error: parse error, unexpected ',' in /hsphere/local/home/vikram/thalforum.com/forums/modules/announements.php on line 23
HHHHHHHHEEEEEEEEELLLLLLLLLP
Viks, Did you ever get the problem fixed? Looking at your code above, it looks like a typo on the filename. There is no letter 'C' in your announcements.php.
tarang
05-21-2005, 03:47 AM
What about Global Annoucements?
I mean.. what should i put in the forum id to pull from configuration for Global Annoucements?
gothic1213
08-03-2005, 07:22 AM
Only one thing I must find out and that is if there is a way to use the WYSIWYG editor with Announcement(s)..
Anything new on this, like this idea.
Mikecp421
09-21-2005, 12:18 AM
I installed this, very easy and works great! Thanks it was exactly what I was looking for!
klaush
10-04-2005, 06:26 PM
Hello from Germany,
sorry, but i couldnīt get this hack to work with CMPS!
May be i donīt understand how to create modules and/or templates.
So if any of you could specify a detailed information to build this hack i would be glad to see and thanks for your help.
Greetings
Klaus
dleblanc
10-08-2005, 09:32 AM
Has anyone actually gotten this module working in vBadvanced 2.0 and vBulletin 3.5. If so can you either download your module and give instructions on how to install or just use the vBa CMPS download/Upoad feature.
Mikecp421
10-08-2005, 09:35 AM
if anyone needs help AIM me at mikecp421, I'll do what I can as it was easy for me to install on my forum
edit: FYI I am running this on 3.0.8 and 3.0.9 not 3.5
Hi I'm a noob to vBulletin, I wanna display this on my front page, Could someone give me a step by step plan on what im doing, I've attempted twice and I've gotten
adv_portal_announcements
adv_portal_announcementbit
adv_portal_announcements
adv_portal_announcementbit
sitting at the top of my page,
vBulletin Version 3.0.7
CMPS v2.0.0 (vB 3.5)
sinjix_media
04-18-2006, 06:27 AM
I am about to try this. It looks like just what I need.
Viks, Did you ever get the problem fixed? Looking at your code above, it looks like a typo on the filename. There is no letter 'C' in your announcements.php.
I get the same error
What do we fill in here?
// get announcements
$announcebits = '';
$announcements = $DB_site->query("
SELECT
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.