Page 1 of 17

Forum Sponsors

Posted: Sun Aug 20, 2006 5:07 pm
by Extensions Robot
MOD Name: Forum Sponsors
Author: EXreaction
MOD Description: Allows you to add advertisements in specific forums

MOD Version: 1.0.02c (Updated 11/13/06)
Tested on phpBB Version: 2.0.21

Download File: Forum Sponsors 1.0.02c.zip
mods overview page: View
File Size: 26525 Bytes

Image

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version listed in the topic. It may not work in any other versions of phpBB.

Posted: Tue Sep 19, 2006 3:23 pm
by TerraFrost
MOD Validated/Released

Notes:

Posted: Tue Sep 19, 2006 3:29 pm
by EXreaction
Screenshots:

ImageImage
(images still work, click on them to see the screenshots)

Posted: Tue Sep 19, 2006 10:33 pm
by LoganSix
Just installed.
Quick and easy. It may need some more description.

"This allows for adding text/html above a forum to provide information for the Sponsor of the forum." or something to that extent.

The only issue I am having is the {L_FORUM_SPONSOR} is not displaying on the Administration screen. Not sure if something was left out to make this work or not.

Posted: Tue Sep 19, 2006 10:41 pm
by igorw
Some demo screenshots would be nice :)

Posted: Tue Sep 19, 2006 10:45 pm
by LoganSix
Found it.

At this point when you open the admin_forums.php

Code: Select all

# 
#-----[ OPEN ]------------------------------------------
# 

admin/admin_forums.php

#
#-----[ FIND ]------------------------------------------
# 

			$s_hidden_fields = '<input type="hidden" ...
			$template->assign_vars(array(

When you add the After part

Code: Select all

#-----[ AFTER, ADD ]------------------------------------------
#

				'SPONSOR'		=> $forum_sponsor,

#
This should be

Code: Select all

#-----[ AFTER, ADD ]------------------------------------------
#

				'SPONSOR'		=> $forum_sponsor,
				'L_FORUM_SPONSOR' => $lang['Forum_Sponsor'],
#

Posted: Tue Sep 19, 2006 10:56 pm
by LoganSix
In the Forum Management section, it adds a new form field for adding text/html.
Image

In the actual forum, that text/html is displayed.
Image

Posted: Wed Sep 20, 2006 2:04 am
by EXreaction
Oops, your right LoganSix, I did miss that(surprised the mod team did too :oops: )

I will fix that right away and re-upload it. :)

Thanks! :)

Posted: Wed Sep 20, 2006 11:24 am
by igorw
Very cool! How about BBCode support? Look at my bbcode in forum description MOD, to see how to get it work :)

Posted: Wed Sep 20, 2006 2:34 pm
by LoganSix
No problem about catch. It helps me understand the phpBB coding stuff better.

As far as BBCode. That would be a nice feature.

However, I would like to have a database table of sponsors and their information and be able to select a sponsor from a list. Once the sponsor is selected, then an image, link, and information about the sponsor would be put into a template for the header.

I am currently working on using Google [Maps] Forum (unreleased mod) to show sponsors, users, and points of interests in the area. Once I get that going a little further, I might modify this mod to do what I mentioned above.

Obviously, I would need to add an administration screen just for adding sponsors to the forum.

Posted: Wed Sep 20, 2006 9:21 pm
by EXreaction
eviL<3 wrote: Very cool! How about BBCode support? Look at my bbcode in forum description MOD, to see how to get it work :)


Ya, that would sound nice, I have it working now, but I have to ask the wGEric something about whether or not the BBCode needs to get a legal UID or if I can just make it have the UID as '' when it parses it for output...

I have it like this now, and it works, but I don't know if they would allow it in a mod or not:

Code: Select all

		include_once($phpbb_root_path . "includes/bbcode.$phpEx");
		$forum_sponsor   = bbencode_first_pass( $forum_sponsor, '' );
		$forum_sponsor   = bbencode_second_pass ( $forum_sponsor, '' );
		$forum_sponsor   = smilies_pass ( $forum_sponsor );
		$forum_sponsor   = str_replace("\n", "\n<br />\n", $forum_sponsor);
LoganSix wrote: No problem about catch. It helps me understand the phpBB coding stuff better.

As far as BBCode. That would be a nice feature.

However, I would like to have a database table of sponsors and their information and be able to select a sponsor from a list. Once the sponsor is selected, then an image, link, and information about the sponsor would be put into a template for the header.

I am currently working on using Google [Maps] Forum (unreleased mod) to show sponsors, users, and points of interests in the area. Once I get that going a little further, I might modify this mod to do what I mentioned above.

Obviously, I would need to add an administration screen just for adding sponsors to the forum.


A table with ads would be nice, but I am afraid I will not add that to this mod. I like to keep it as simple as possible, and if I add that it will take much more work for just a little gain. :)

Posted: Wed Sep 20, 2006 9:31 pm
by igorw
I think it's possible, but it would be better to have it stored in the db, as that makes the page load faster. If a new uid has to be generated at every page load, it would slow down the forum unnecessairily ;)

I suggest you have one generated on page edit.

Posted: Wed Sep 20, 2006 9:50 pm
by EXreaction
eviL<3 wrote: I think it's possible, but it would be better to have it stored in the db, as that makes the page load faster. If a new uid has to be generated at every page load, it would slow down the forum unnecessairily ;)

I suggest you have one generated on page edit.


How would storing it in the DB make it faster? It would need to make one more query on every page load then...

It isn't generating a new UID every time, it just doesn't use the UID at all...or that is what it is supposed to be doing. I never did look at the way the BBCode gets parsed in phpBB2(I looked a little in 3).

Posted: Thu Sep 21, 2006 5:22 am
by igorw
I'm not sure what the UID is used for excactly, but it gets used for everything. If it's stored in the database, let's say the forums table, you could extend the query, and not have an additional one. Look at the posts table, it also works that way ;)

Posted: Thu Sep 21, 2006 11:39 am
by LoganSix
EXreaction wrote: A table with ads would be nice, but I am afraid I will not add that to this mod. I like to keep it as simple as possible, and if I add that it will take much more work for just a little gain. :)


I understand.

Basically, my needs are for a system to track sponsors and what discounts/deals they are giving to my group. So, if I can keep it all in a database table, instead of a spread sheet, the easier for me. Then, if I can take that data and display in on the forum/web page, all the much better.

Thanks for the mod, it will be my starting point.