Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ v2.5.x
Author Message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1242

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

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
Former Admin in Good Standing


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

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

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 .

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
dad7732
PostPosted: Sun May 25, 2008 6:00 am Reply with quote

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
 
BobMarion
PostPosted: Sun May 25, 2008 8:23 am Reply with quote

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.
 
dad7732
PostPosted: Sun May 25, 2008 8:57 am Reply with quote

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.
 
BobMarion
PostPosted: Sun May 25, 2008 1:17 pm Reply with quote

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.
 
dad7732
PostPosted: Sun May 25, 2008 4:39 pm Reply with quote

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

Cheers, Jay
 
dad7732
PostPosted: Sun May 25, 2008 5:44 pm Reply with quote

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

Cheers, Jay
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel™ v2.5.x

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©