Sponsered Categories Mod

Mods etc.

Moderator: Integra Moderator

Sponsered Categories Mod

PostAuthor: Skywalker » Sun Apr 23, 2006 9:50 am

could someone port this to integramod?

Code: Select all
################################################################# ## Mod Title]http://www.wyvern.com.au/~sam/mods#[/url]# Description:  This mod allows you to display an image next to ##               each of your categories. This is useful for ##               corporate websites where companies may pay to ##               display their logo next to a catagory as the ##               'sponser'.## ## Installation Level:  Moderate## Installation Time:   10-15 Minutes ## Files To Edit:       x ## Included Files:      INSTALL ################################################################# ## ## Author Notes: ## ~~~~~~~~~~~~ ## o If you use EasyMod you will still have to run the SQL below ##   manually. At the moment it comes in only MYSQL flavour. If ##   anyone else can give me a hand, I'd love to have some ##   translastions ;) ## ## o This was created for [url=http://www.hosting-chat.co.uk/]http://www.hosting-chat.co.uk/[/url] ## ## o This mod is EasyMod v0.4alpha compatible. ##   [url=http://www.phpbb.com/community/viewtopic?t=12345]http://www.phpbb.com/community/viewtopic?t=12345[/url] ## ## o Questions? Comments? LET ME KNOW! I would love to hear how ##   and where you use this script and how useful it is to you. ##   Feel free to submit bugs, feature requests and sugestions ##   to my email or private message me at [url=http://www.phpbb.com/]http://www.phpbb.com/[/url] ## ## Change Log: ## ~~~~~~~~~~ ## 1.0.0 ##  o Initial release ##  o EasyMod v0.4alpha compatible ## ################################################################# # #-----[ RUN SQL ]------------------------------------------------ # # You may have to change your database prefix # MYSQL: ALTER TABLE phpbb_categories ADD cat_sponser_img VARCHAR(255) NOT NULL, ADD cat_sponser_url VARCHAR(255) NOT NULL;# #-----[ OPEN ]--------------------------------------------------- # index.php# #-----[ FIND ]--------------------------------------------------- # $sql = "SELECT c.# #-----[ REPLACE ]------------------------------------------------ # $sql = "SELECT c.*# #-----[ FIND ]--------------------------------------------------- #    $template->assign_block_vars('catrow', array(     'CAT_ID' => $cat_id,# #-----[ AFTER, ADD ]--------------------------------------------- #     'SPONSER' => ( $category_rows[$i]['cat_sponser_img'] ? ( $category_rows[$i]['cat_sponser_url'] ? '<a>' : '' ) . '<img>' : '' ), # #-----[ OPEN ]--------------------------------------------------- # templates/subSilver/index_body.tpl# #-----[ FIND ]--------------------------------------------------- #  <td> </td># #-----[ IN-LINE FIND ]------------------------------------------- # </td># #-----[ IN-LINE BEFORE, ADD ]------------------------------------ # {catrow.SPONSER}# #-----[ OPEN ]--------------------------------------------------- # admin/admin_forums.php# #-----[ FIND ]--------------------------------------------------- #    $template->assign_vars(array(     'CAT_TITLE' => $cat_title,# #-----[ AFTER, ADD ]--------------------------------------------- #     'CAT_SPONSER_IMG' => $row['cat_sponser_img'],     'CAT_SPONSER_URL' => $row['cat_sponser_url'],       'L_CAT_SPONSER_IMAGE' => $lang['Category_sponser_image'],     'L_CAT_SPONSER_URL' => $lang['Category_sponser_url'],# # Full lines:#    $sql = "UPDATE " . CATEGORIES_TABLE . "#    SET cat_title = '" . str_replace("'", "''", $HTTP_POST_VARS['cat_title']) . "'#    WHERE cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]);##-----[ FIND ]--------------------------------------------------- #    $sql = "UPDATE " . CATEGORIES_TABLE . "     SET     WHERE # #-----[ IN-LINE FIND ]------------------------------------------- # cat_title']) . "'# #-----[ IN-LINE AFTER, ADD ]------------------------------------- # , cat_sponser_img = '" . str_replace("'", "''", $HTTP_POST_VARS['cat_sponser_img']) . "', cat_sponser_url = '" . str_replace("'", "''", $HTTP_POST_VARS['cat_sponser_url']) . "'  # #-----[ OPEN ]--------------------------------------------------- # language/lang_english/lang_admin.php# #-----[ FIND ]--------------------------------------------------- # //// That's all Folks!// -------------------------------------------------# #-----[ BEFORE, ADD ]-------------------------------------------- # $lang['Category_sponser_image'] = "Category Sponser Image";$lang['Category_sponser_url'] = "Category Sponser URL";  # #-----[ OPEN ]--------------------------------------------------- # templates/subSilver/admin/category_edit_body.tpl# #-----[ FIND ]--------------------------------------------------- #  <tr>    <td>{L_CATEGORY}    <td>  </tr># #-----[ AFTER, ADD ]--------------------------------------------- #  <tr>    <td>{L_CAT_SPONSER_IMAGE}</td>    <td><input></td>  </tr>  <tr>    <td>{L_CAT_SPONSER_URL}</td>    <td><input></td>  </tr># #-----[ SAVE/CLOSE ALL FILES ]----------------------------------- # #EoM
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Sun Apr 23, 2006 1:05 pm

Have you not tried this in a test forum? There is nothing in this that would be different in integramod that I can see.

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

PostAuthor: Skywalker » Sun Apr 23, 2006 1:20 pm

"Adrian Rea";p="2791" wrote:Have you not tried this in a test forum? There is nothing in this that would be different in integramod that I can see.

A


no i'm working on few mods and wil release me first mod soon so i diddent had the time to check it myself.

i thought CH had edited the categories settings thats why i posted this...

butt if this seems to work you may delete this post
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

PostAuthor: Adrian Rea » Sun Apr 23, 2006 1:22 pm

damn I forgot about CH (kick me!)

I am sure there must be a way to do it fairly easily, but I don't have time right now. maybe soon

A
Last edited by Adrian Rea on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Adrian Rea
Sr Integra Member
Sr Integra Member
 
Posts: 1263
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 12, 2006 12:59 am
Cash on hand: 0.00

PostAuthor: Skywalker » Sun Apr 23, 2006 1:28 pm

"Adrian Rea";p="2793" wrote:damn I forgot about CH (kick me!)

I am sure there must be a way to do it fairly easily, but I don't have time right now. maybe soon

A


don't worry A my brain abandons me also sometime 8)
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00

PostAuthor: Skywalker » Mon May 29, 2006 4:07 am

"Adrian Rea";p="2793" wrote:damn I forgot about CH (kick me!)

I am sure there must be a way to do it fairly easily, but I don't have time right now. maybe soon

A


do you have time now?
or now someone who can port this?
i would love to see this on my board
Last edited by Skywalker on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

Skywalker
Sr Integra Member
Sr Integra Member
 
Posts: 236
Likes: 0 post
Liked in: 0 post
Joined: Fri Apr 14, 2006 5:25 pm
Cash on hand: 0.00


Return to IntegraMOD Modifications

Who is online

Registered users: App360MonitorBot, Bing [Bot]