Coinbase

Author Topic: Add new areas  (Read 1926 times)

0 Members and 1 Guest are viewing this topic.

Offline Pablo

  • Newbie
  • *
  • Posts: 2
Add new areas
« on: January 31, 2009, 02:13:54 pm »
Hi guys, I would like to add another page where I can choose if show the ads or not.

I searched in all the files the word "show_underchildren" (and then, just to check only "underchildren") and I copied that lines and after pasted them I edited them.
So for example there was:
Code: [Select]
<tr class="windowbg2">
<td align="left"><a href="', $scripturl, '?action=admod;sa=help;help=ad_manage_underchildren" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['ad_manage_admin_show_underchildren'] ,'</td>
<td><input type="checkbox" name="show_underchildren" /></td>
</tr>
and I changed it:

Code: [Select]
<tr class="windowbg2">
<td align="left"><a href="', $scripturl, '?action=admod;sa=help;help=ad_manage_underchildren" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['ad_manage_admin_show_underchildren'] ,'</td>
<td><input type="checkbox" name="show_underchildren" /></td>
</tr>
<tr class="windowbg2">
<td align="left"><a href="', $scripturl, '?action=admod;sa=help;help=ad_manage_searchpage" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="top" /></a> ', $txt['ad_manage_admin_show_searchpage'] ,'</td>
<td><input type="checkbox" name="show_searchpage" /></td>
</tr>

In this way I had another option to the admin panel. I did this step in every page that the mod edited, and with notepad I tried counting the times that there is "underchildren" and "searchpage" and they matched .
So I think that I did all in the right way, but in the admin page, so index.php?action=admod;sa=add there is not any new line, any new row... So I can't check that checkbox to show the code in the search page.

I also created a database field, like the other ones.

Can you tell me why this doesn't work?

I will attach all the files I edited. You can easily find where I edited, because I just copied the "underchildren" lines, and pasted them just underneath.

Here is a screen (I refreshed so many times the page):
http://img98.imageshack.us/img98/3369/cattvh6.jpg

Sorry for my bad English, but I'm an Italian guy :D
Thank you in advance, Paolo.

Offline Pablo

  • Newbie
  • *
  • Posts: 2
Re: Add new areas
« Reply #1 on: January 31, 2009, 02:29:41 pm »
When I insert an ad there is an error:
Quote
Unknown column 'CATEGORY' in 'field list'
File: C:\Program Files\EasyPHP 3.0\www\smf-1\Sources\Ads.php
Line: 193
I installed automatically the mod, and it didn't give me any error.
Anyway, the ad it's added also if there is this error. Because if I go to "edit ads" it appear in the list, so the error doesn't deny the adding. *DOESN'T WORK, read second edit

EDIT: If I try editing an ad, it give me the same error but it doesn't save the changes!

EDIT2: Also if I add an ad, after the error, it actually add the record, but doesn't save the places where it have to show the ads, and neither the other fields. It save just the first two fields: Name, Content (the code of the banner)
« Last Edit: January 31, 2009, 02:37:39 pm by Pablo »

SMF Ads Support Forum

Re: Add new areas
« Reply #1 on: January 31, 2009, 02:29:41 pm »
.