|
Removing Postbit from Announcements
|
|
08-18-2008, 09:09 PM
(This post was last modified: 08-18-2008 09:11 PM by Kodaks.)
Post: #1
|
|||
|
|||
|
Removing Postbit from Announcements
Hello,
I've been developing a new plugin for MyBB 1.4 and I seem to have hit a roadblock. I wanted to remove all styling and header/footer items from the announcements.php pages on the forum. I opened up the announcement template and found this: Code: <html>So, I simply replaced it with this: Code: {$announcement}I was dismayed to see that even after I altered the template, the announcements still had postbit_classic styles attached to them: [attachment=10622] I only want the announcement message to display when someone visits an announcements.php page. I do not want the postbit buttons, border, background or tables to be used. I looked around announcements.php and /inc/functions_post.php, but could not find anything myself. How do I remove the postbit layout from the annoucements? I'm sure I have overlooked something simple, but for the life of me I just can't figure it out. Thanks for any help, I greatly appreciate it! Looking to purchase advertising spots on popular MyBB-powered forums. Ads will be displayed from various ad networks - Please PM me for details. |
|||
|
08-19-2008, 07:22 AM
Post: #2
|
|||
|
|||
|
RE: Removing Postbit from Announcements
If you're developing a plugin, the simplest thing would probably to write your own announcements.php page, since all you want is the message.
Something like this I suppose: PHP Code: define('IN_MYBB', 1); |
|||
|
08-19-2008, 02:22 PM
(This post was last modified: 08-20-2008 06:50 PM by Kodaks.)
Post: #3
|
|||
|
|||
RE: Removing Postbit from Announcements
(08-19-2008 07:22 AM)ZiNgA BuRgA Wrote: If you're developing a plugin, the simplest thing would probably to write your own announcements.php page, since all you want is the message. Thanks, I'll try this out. Looking to purchase advertising spots on popular MyBB-powered forums. Ads will be displayed from various ad networks - Please PM me for details. |
|||
|
08-20-2008, 06:49 PM
(This post was last modified: 08-20-2008 06:49 PM by Kodaks.)
Post: #4
|
|||
|
|||
|
RE: Removing Postbit from Announcements
Hmm...I seem to be having a bit more problems with the new announcement page you suggest I create.
I created a new "announcements" page that is called information.php. Inside, I have the following PHP code: PHP Code: <?phpWhen I visit the information.php?aid=9 page in my browser, I get the following error: Quote:Fatal error: Call to undefined function: simple_simple() in */*/public_html/information.php on line 8 Line 8 of the information.php is: PHP Code: $ann = $db->fetch_array($db->simple_simple('announcements', '*', 'aid='.$aid)); I don't understand the simple_simply part of code on this line. Is this a new development in MyBB, or is it a coding mistake? What do I need to do in order to get this new information.php page to function correctly? Thanks again for your help, I really appreciate it! Looking to purchase advertising spots on popular MyBB-powered forums. Ads will be displayed from various ad networks - Please PM me for details. |
|||
|
08-20-2008, 09:17 PM
Post: #5
|
|||
|
|||
| RE: Removing Postbit from Announcements | |||
|
08-20-2008, 09:21 PM
Post: #6
|
|||
|
|||
RE: Removing Postbit from Announcements This user has been denied support.
Shouldn't simple_simple be simple_select?
New MyBB plugin is "IPLH (IP Log History) v1.0". ![]() Vote for MyBB to add a Security section. |
|||
|
08-21-2008, 05:23 AM
Post: #7
|
|||
|
|||
RE: Removing Postbit from Announcements
(08-20-2008 09:17 PM)WDZ Wrote:(08-20-2008 06:49 PM)Kodaks Wrote: I don't understand the simple_simply part of code on this line. Is this a new development in MyBB, or is it a coding mistake? (08-20-2008 09:21 PM)labrocca Wrote: Shouldn't simple_simple be simple_select?I understand it was a typo, but didn't used to have something else included in those kinds of lines for this type of function to work? Was there some kind of change with this new version? Looking to purchase advertising spots on popular MyBB-powered forums. Ads will be displayed from various ad networks - Please PM me for details. |
|||
|
08-21-2008, 06:25 AM
Post: #8
|
|||
|
|||
|
RE: Removing Postbit from Announcements
You could store the query result resource in a temporary variable like this, but ZiNgA BuRgA made his code a bit more compact.
PHP Code: $query = $db->simple_select('announcements', '*', 'aid='.$aid);The only change I can think of in 1.4 is that you don't need to use TABLE_PREFIX anymore. |
|||
|
08-21-2008, 07:06 PM
Post: #9
|
|||
|
|||
RE: Removing Postbit from Announcements
Quote:The only change I can think of in 1.4 is that you don't need to use TABLE_PREFIX anymore. Ahhh...thats what I was thinking of! ![]() After I changed the simple_simple to simple_select, but now I am experiencing a different error message. Here is the error: Quote:Fatal error: Call to undefined function: phpdefine() in */*/public_html/information.php on line 2 Again, here is the code I am using for information.php: PHP Code: <?phpIt seems to me that I am missing the code where it instructs the script to retrieve the applicable announcements from the MySQL database. I tried adding that part it, but to no avail. Any ideas? Thanks again! Looking to purchase advertising spots on popular MyBB-powered forums. Ads will be displayed from various ad networks - Please PM me for details. |
|||
|
08-21-2008, 09:46 PM
Post: #10
|
|||
|
|||
|
RE: Removing Postbit from Announcements
Dennis Tsang :: MyBB Developer Follow me on Twitter: @dennistt Vote MyBB as the #1 Free Forum Software of 2011 |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread:
Search
Member List
Calendar
Help






This user has been denied support.
![[Image: 468x60_SF.gif]](http://supportforums.net/images/banners/468x60_SF.gif)
