PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
dad7732
Worker
Worker


Joined: Mar 18, 2007
Posts: 224

PostPosted: Fri May 23, 2008 2:11 pm Reply with quote Back to top

Ok, created my own custom template, no problem. Added it to the Template Menu, also no problem and displays as intended, etc.

However, I want to add it to the list in the "Add Blocked IP". I notice that not all templates are listed. How do I get my custom template added to that list.

My guess would be to add it as an <option> in the ABBlockedIPAdd.php file .. yes? Not in THAT file but I can probably find where OR someone can save me some time by telling me where to add the template file in the dropdown .. Smile

Cheers

Jay
View user's profile Send private message
BobMarion
Site Admin


Joined: Oct 30, 2002
Posts: 1039
Location: RedNeck Land (known as Kentucky)

PostPosted: Sat May 24, 2008 11:16 pm Reply with quote Back to top

Template names must be in the form of abuse_xxxx.tpl for blocker templates or admin_xxxx.tpl for administrative templates. NukeSentinel then picks them up and displays it in the option list without abuse_, admin_, and .tpl .
View user's profile Send private message Send e-mail Visit poster's website
dad7732
Worker
Worker


Joined: Mar 18, 2007
Posts: 224

PostPosted: Sun May 25, 2008 6:00 am Reply with quote Back to top

What I said:
Quote:
Ok, created my own custom template, no problem. Added it to the Template Menu, also no problem and displays as intended, etc.

So, I already did that, etc. My question is how to get an additional template to show up in the choices for "Add an IP" in the blocker menu and also in the Edit menu when editing an already existing blocked IP.

My workaround so far is to make a backup of abuse_admin.tpl and then rename my custom template to abuse_admin.tpl .. this works as intended to get my custom template to work.

Example:

Created abuse_banned.tpl - shows up in the Template Menu.

Then - Blocked IP => Add an IP => does NOT show up in the drop-down list of template choices.

Cheers, Jay
View user's profile Send private message
BobMarion
Site Admin


Joined: Oct 30, 2002
Posts: 1039
Location: RedNeck Land (known as Kentucky)

PostPosted: Sun May 25, 2008 8:23 am Reply with quote Back to top

That menu select list is not a template list. It is a block reason list. It is tied to the blockers table and not to templates. When adding a "Blocked IP" you are selecting the reason you are blocking it. In "Blocker Configuration" you can select the template that is displayed for each blocker type.
View user's profile Send private message Send e-mail Visit poster's website
dad7732
Worker
Worker


Joined: Mar 18, 2007
Posts: 224

PostPosted: Sun May 25, 2008 8:57 am Reply with quote Back to top

What you say makes perfect sense but doesn't fix my problem. When I manually block an IP, the "reason select list" does not contain my custom template reason "Banned", it only shows 12 entries, I need a 13th entry "Banned". But, since the abuse_admin.tpl has no use for "me" as-is, I renamed MY template to that one and it serves my purpose. However, being of an inquisitive nature I'd still like to know how to get abuse_banned.tpl "Banned" to show in THAT list.

I will, of course, pursue your line of explanation a bit more and see what I can come up with in that respect. Perhaps I'm not going far enough into the configuration, etc.

Cheers and thanks.
View user's profile Send private message
BobMarion
Site Admin


Joined: Oct 30, 2002
Posts: 1039
Location: RedNeck Land (known as Kentucky)

PostPosted: Sun May 25, 2008 1:17 pm Reply with quote Back to top

Okay, there are 11 blocker types. We only add new blocker types if and when required by the type of attacks. The list has one extra entry of "Other". Your template will not show up in that list because it is not a blocker but a resulting display page triggered by a blocker as set in "Blocker Configuration".

In your case you would select the "Other" option since it wasn't an attack but a plain block. If you want the "Other" option to use your template, name the template abuse_default.tpl and overwrite the old one with yours.

The list is the same in "Add Blocked IP" and in "Add Blocked Range" and has no allowance for adding to it unless a new blocker type is added to the system. Just adding an extra option by changing the code will not do what you want unless it has a blocker type associated with it and therefore will do you no good.
View user's profile Send private message Send e-mail Visit poster's website
dad7732
Worker
Worker


Joined: Mar 18, 2007
Posts: 224

PostPosted: Sun May 25, 2008 4:39 pm Reply with quote Back to top

Thanks, sounds like the default option is the way to go and I can restore the abuse_admin back to the original ...

Cheers, Jay
View user's profile Send private message
dad7732
Worker
Worker


Joined: Mar 18, 2007
Posts: 224

PostPosted: Sun May 25, 2008 5:44 pm Reply with quote Back to top

Bob, did what you suggested and that works as I first intended but a much easier workaround.

Cheers, Jay
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum