Forum Sponsors

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
11
50%
Very Good
5
23%
Good
3
14%
Fair
2
9%
Poor
1
5%
 
Total votes: 22

User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Post by EXreaction »

eviL<3 wrote: 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 ;)


Actually, I just heard from wGEric and he said as long as it worked it would be fine(my way with no UID). But if you have BBCodes inside of BBCodes you will have problems. So when I get a chance I will have to try it out. :)
LoganSix wrote:
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.


Ya, something like that would be much bigger than this mod. To do that you would probably end up not using any of the code I have now after it is finished. :)

No problem, once you get it finished PM me with a link to it if you remember, I would like to see how it works. :)
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Post by ChriZathens »

Hi there !!!!
I installed the mod , just to view it , and then uninstalled it (will need it later)
But the table under pruning options remains there...!!!
How can i remove it?
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Post by EXreaction »

ChriZathens wrote: Hi there !!!!
I installed the mod , just to view it , and then uninstalled it (will need it later)
But the table under pruning options remains there...!!!
How can i remove it?


Remove the part that was added to templates/subSilver/admin/forum_edit_body.tpl

;)
FormateD
Registered User
Posts: 2
Joined: Wed Sep 27, 2006 8:20 am

Post by FormateD »

Hi!

I install the mod and the only think I cannot add is the SQL part!

Who I do this?

SQL
ALTER TABLE `phpbb_forums` ADD `sponsor` TEXT NOT NULL;

Thanks 8)
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Post by EXreaction »

FormateD wrote: Hi!

I install the mod and the only think I cannot add is the SQL part!

Who I do this?

SQL
ALTER TABLE `phpbb_forums` ADD `sponsor` TEXT NOT NULL;

Thanks 8)


You can run the query through phpMyAdmin, since you probably don't know how to do that I made a database updater script for ya. 8)

Unzip and upload this file to your phpBB2 root directory:
http://www.lithiumstudios.org/files/php ... nstall.zip

Then run it with a web browser(just go to your forum's index page, then change index.php at the end(if it is there) to db_install.php).

After it is run just delete the file from your ftp directory. :)
LadyHoldem
Registered User
Posts: 3
Joined: Fri Sep 29, 2006 2:27 am
Contact:

Post by LadyHoldem »

Hi I'm completely clueless when it comes to this kinda thing!

I wanted to do it manually, because that ezmod thing and I don't really get along to well ;)

But I tried the phpmyadmin, and since i didnt want to spend 6 months in school figuring out what the heck I was doing there, I used ezmod...

It says it's installed, ... I dont see it.... is there something more I need to do ?

Thanks in advance, btw.. kooool mod :)

~LadyH
LyleLyle
Registered User
Posts: 2
Joined: Thu Aug 31, 2006 11:04 pm

Post by LyleLyle »

Nice Mod. Installed ;)
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Post by EXreaction »

LadyHoldem wrote: Hi I'm completely clueless when it comes to this kinda thing!

I wanted to do it manually, because that ezmod thing and I don't really get along to well ;)

But I tried the phpmyadmin, and since i didnt want to spend 6 months in school figuring out what the heck I was doing there, I used ezmod...

It says it's installed, ... I dont see it.... is there something more I need to do ?

Thanks in advance, btw.. kooool mod :)

~LadyH


You won't notice anything different right away...

In the admin panel go to Forum Admin -> Management -> (click Edit on the forum you want to make a sponsored forum) -> Enter the ad code in the text box at the bottom(sorry it doesn't have a name by it, I forgot that in this version, it is fixed for the next version) -> hit submit and the ad should display in that forum.

:)
FormateD
Registered User
Posts: 2
Joined: Wed Sep 27, 2006 8:20 am

Post by FormateD »

Hi!

I'm try to install this MOD with EasyMOD but I don't know what's the problem...

Something is missing in the CODE:

Code: Select all

##############################################################
## MOD Title: Forum Sponsors
## MOD Author: EXreaction < exreaction@lithiumstudios.org > (Nathan Guse) http://www.lithiumstudios.org
## MOD Description: Allows you to add advertisments in specific forums
## MOD Version: 1.0.01
##
## Installation Level: Intermediate
## Installation Time: ~5 Minutes
## Files To Edit:	admin/admin_forums.php
##					includes/page_header.php
##					language/lang_english/lang_main.php
##					templates/subSilver/viewforum_body.tpl
##					templates/subSilver/viewtopic_body.tpl
##					templates/subSilver/admin/forum_edit_body.tpl
## Included Files:	none
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This mod is owned by WW < bjgobble@yahoo.com > http://www.thearkansashuntingandfishingforum.com,
##  and was created by EXreaction.
##
## Please use my forums(you can find them at http://www.lithiumstudios.org)
##  for support.  WW paid for this mod and was kind enough to allow me to release this mod to everyone, so
##  drop him a thanks over at his forum(located at http://www.thearkansashuntingandfishingforum.com).
##
## If you want to move the location of the ad placement in viewforum and viewtopic, simply change the locations
##  of the sections that were added to viewforum_body.tpl and viewtopic_body.tpl.
##############################################################
## MOD History:
## 
##   2006-07-31 - Version 1.0.0
##      - Initial Release
##   2006-08-20 - Version 1.0.01
##      - Fixes
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]-------------------------------------------
#

ALTER TABLE `phpbb_forums` ADD `sponsor` TEXT NOT NULL;

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

admin/admin_forums.php

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

			$s_hidden_fields = '<input type="hidden" name="mode" value="' . $newmode .'" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';

			$template->assign_vars(array(

# 
#-----[ BEFORE, ADD ]------------------------------------------
# 

			if (intval($forum_id) != '')
			{
				$sql = "SELECT sponsor
					FROM " .  FORUMS_TABLE . "
					WHERE forum_id = " . $forum_id;
				if ( !$result = $db->sql_query($sql) )
				{
					message_die(GENERAL_ERROR, 'Could not select forum sponsor data', '', __LINE__, __FILE__, $sql);
				}
	
				while( $row = $db->sql_fetchrow($result) )
				{
					$forum_sponsor = $row['sponsor'];
				}
			}

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

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

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

			$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")

#
#-----[ IN-LINE FIND ]---------------------------------
#

, prune_enable

#
#-----[ IN-LINE AFTER, ADD ]---------------------------
#

, sponsor

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

				VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

#
#-----[ IN-LINE FIND ]---------------------------------
#

intval($HTTP_POST_VARS['prune_enable'])

#
#-----[ IN-LINE AFTER, ADD ]---------------------------
#

 . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['sponsor']) . "'"

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

				SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "

#
#-----[ IN-LINE FIND ]---------------------------------
#

" . intval($HTTP_POST_VARS['prune_enable']) . "

#
#-----[ IN-LINE AFTER, ADD ]---------------------------
#

, sponsor = '" . str_replace("\'", "''", $HTTP_POST_VARS['sponsor']) . "'

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

includes/page_header.php

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

//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//

# 
#-----[ BEFORE, ADD ]------------------------------------------
# 

if (intval($forum_id) != '')
{
	$sql = "SELECT sponsor
		FROM " .  FORUMS_TABLE . "
		WHERE forum_id = " . $forum_id;
	if ( !$result = $db->sql_query($sql) )
	{
		message_die(GENERAL_ERROR, 'Could not select forum sponsor data', '', __LINE__, __FILE__, $sql);
	}

	while( $row = $db->sql_fetchrow($result) )
	{
		$forum_sponsor = $row['sponsor'];
	}
}

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

$template->assign_vars(array(

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

	'FORUM_SPONSOR'		=> $forum_sponsor,

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

	'L_USERNAME' => $lang['Username'],

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

	'L_FORUM_SPONSOR' => $lang['Forum_Sponsor'],

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

language/lang_english/lang_main.php

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

?>

# 
#-----[ BEFORE, ADD ]------------------------------------------
# 

$lang['Forum_Sponsor'] = 'Forum Sponsor';

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

templates/subSilver/viewforum_body.tpl

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

</table>

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

<table width="100%" cellspacing="1" cellpadding="2" border="0" align="center"> 
	<tr>
		<td align="center">
			{FORUM_SPONSOR}
		</td>
	</tr>
</table>

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

templates/subSilver/viewtopic_body.tpl

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

	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
  </tr>
</table>

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

<table width="100%" cellspacing="1" cellpadding="2" border="0" align="center"> 
	<tr>
		<td align="center">
			{FORUM_SPONSOR}
		</td>
	</tr>
</table>

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

templates/subSilver/admin/forum_edit_body.tpl

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

	  </table></td>
	</tr>

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

	<tr>
		<td class="row1">{L_FORUM_SPONSOR}</td>
		<td class="row2"><textarea rows="5" cols="45" wrap="virtual"  name="sponsor" class="post">{SPONSOR}</textarea></td>
	</tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Thanks!!!! 8)
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Post by EXreaction »

FormateD wrote: Hi!

I'm try to install this MOD with EasyMOD but I don't know what's the problem...

Something is missing in the CODE:

Thanks!!!! 8)


Please don't paste the entire mod code...I already know what is in it. ;)

What are you having a problem with? It won't install with easymod or what?
felthead
Registered User
Posts: 16
Joined: Sun Jul 31, 2005 1:01 pm

HELP INSTALLING PLEASE

Post by felthead »

Had some difficulty on my own cuz I didn't know how to add the table in mysql ... but installed Easy MOD and was glad this installed nicely even though it says not EasyMod compliant.

Nice mod...exactly what I needed!

Thanks!
panhead
Registered User
Posts: 723
Joined: Sat Dec 20, 2003 8:17 pm

Combine sponsors with suppliers

Post by panhead »

If you want to store the sponsors in the database, can you combine it with the suppliers from the Garage Mod?
GlobalGamingNews
Registered User
Posts: 23
Joined: Tue Jul 11, 2006 2:06 pm
Contact:

Post by GlobalGamingNews »

Can this mod be used to automatically post a rotated banner after the first post in each thread, like this:

http://www.onlinecasinosandplayers.com/ ... php?t=1496

or this:

http://mb.winneronline.com/showthread.html?t=26274


If not, does anyone know what mod does this??

Thanks.
User avatar
EXreaction
Former Team Member
Posts: 5666
Joined: Sun Aug 21, 2005 9:31 pm
Location: Wisconsin, U.S.
Name: Nathan

Re: HELP INSTALLING PLEASE

Post by EXreaction »

felthead wrote: Had some difficulty on my own cuz I didn't know how to add the table in mysql ... but installed Easy MOD and was glad this installed nicely even though it says not EasyMod compliant.

Nice mod...exactly what I needed!

Thanks!


No mods can be easymod compliant. They are still working on the rules to for mods to follow to make them EMC.

Your welcome. :)
panhead wrote: If you want to store the sponsors in the database, can you combine it with the suppliers from the Garage Mod?


They are stored in the database. In the phpbb_forums table. I have never tried the Garage mod and have no idea what it does. :P
GlobalGamingNews wrote: Can this mod be used to automatically post a rotated banner after the first post in each thread, like this:

http://www.onlinecasinosandplayers.com/ ... php?t=1496

or this:

http://mb.winneronline.com/showthread.html?t=26274


If not, does anyone know what mod does this??

Thanks.


That is the Inline Banner Ad mod. :)

http://www.phpbb.com/phpBB/viewtopic.ph ... highlight=
LadyHoldem
Registered User
Posts: 3
Joined: Fri Sep 29, 2006 2:27 am
Contact:

Post by LadyHoldem »

EXreaction wrote:
LadyHoldem wrote:Hi I'm completely clueless when it comes to this kinda thing!

I wanted to do it manually, because that ezmod thing and I don't really get along to well ;)

But I tried the phpmyadmin, and since i didnt want to spend 6 months in school figuring out what the heck I was doing there, I used ezmod...

It says it's installed, ... I dont see it.... is there something more I need to do ?

Thanks in advance, btw.. kooool mod :)

~LadyH


You won't notice anything different right away...

In the admin panel go to Forum Admin -> Management -> (click Edit on the forum you want to make a sponsored forum) -> Enter the ad code in the text box at the bottom(sorry it doesn't have a name by it, I forgot that in this version, it is fixed for the next version) -> hit submit and the ad should display in that forum.

:)


Oh Oh Oh I see the box!!! So Awesome! Thank you soooo much :) LadyH
Post Reply

Return to “[2.0.x] MOD Database Releases”