Gossamer Forum
Home : Products : Gossamer Links : Discussions :

CSS Classes in Admin side of Validate/Modify Links

Quote Reply
CSS Classes in Admin side of Validate/Modify Links
Greetings:

Is there any way to add a CSS class to the form textareas etc, generated from the Admin side when validating link submissions?

I am looking at a way of loading tinymce as an editor for some textareas, but really need raw code for other textareas. There use to be an 'ask' option in tinymce but that is now deprecated and it appears as though the only way it can be achieved is by using the .class in specific textareas. eg. class="tinymce_on" or class="tinymce_off".

I imagine it would take some significant 'hacking'... but then again someone may have a simple 1 minute solutionSly

Thanks,

Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] CSS Classes in Admin side of Validate/Modify Links In reply to
Bit of a stab in the dark, but in /admin/Links/HTML/Links.pm, find:

sub _plg_form {

I believe this is where the text-areas are defined (not 100% sure though)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Clint] CSS Classes in Admin side of Validate/Modify Links In reply to
GT::SQL::Display::textarea is where the code that generates the html for the textarea is located. Should be an easy change there. Note that it changes the way every textarea that GT::SQL generates.

Adrian
Quote Reply
Re: [brewt] CSS Classes in Admin side of Validate/Modify Links In reply to
Thanks Brewt (and Andy),

This now works a treat. I can even add a small amount of Javascript to this area to open/close editor.

Just one further question if you could assist ...

I've worked out where to edit my add/modify links reviews etc to load the tinymce editor in Admin.pm, but can't work out which file I should edit to achieve the same result for the Templates Editor.

Thanks,

Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] CSS Classes in Admin side of Validate/Modify Links In reply to
admin/templates/admin/build_tpl.html

Adrian
Quote Reply
Re: [brewt] CSS Classes in Admin side of Validate/Modify Links In reply to
Thanks again,

and one last one ..... the last box on the verify/modify links admin screen where the rejected email contents are displayed ....

My code is appearing on all other textareas on that page with the exception of that one ... I am guessing it is being called somewhere else.

Regards,


Clint
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] CSS Classes in Admin side of Validate/Modify Links In reply to
admin/Links/Tools.pm

Adrian
Quote Reply
Re: [brewt] CSS Classes in Admin side of Validate/Modify Links In reply to
I use Links SQL 2.x and changed
admin/GT/SQL/Display/HTML.pm Line 566 to
return qq~<textarea id="$name" rows="$rows" cols="$cols" name="$name" class="mceEditor">$def</textarea>~;

And I've add the Javascript-Code to admin template tools_validate.html which open
tiny_mce on the validate_page.

But I can't integrate tinymce on the modify-page because I did not find a template where
I can add the Javascript-Code.

Best regards from
Bremen/Germany

Lothar
Quote Reply
Re: [eljot] CSS Classes in Admin side of Validate/Modify Links In reply to
I found it, but I am not shure if this is the best way.

I've add the javascript code to admin/gt/sql/admin.pm around line 2740
where you can find:

##
# $self->_start_html;
# -------------------------
# Display the opening form tag.
##
....
....
....
return qq~<html>\n<head><title>$title: $self->{record}</title>INCLUDE JAVASCRIPT HERE</head><body $BODY>\n~;

Best regards from
Bremen/Germany

Lothar
Quote Reply
Re: [eljot] CSS Classes in Admin side of Validate/Modify Links In reply to
Hi,

I don't see why it would be a problem. It will get show on pretty much everyone admin page, but that shouldn't be an issue :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] CSS Classes in Admin side of Validate/Modify Links In reply to
Andy wrote:
Hi,

I don't see why it would be a problem. It will get show on pretty much everyone admin page, but that shouldn't be an issue :)

Cheers

Hi Andy,

Two reasons:
1. I prefer to load javascript only when I need it.
BTW: The Javascript is on each Admin-Page which has no own template.
Maybe I can use something like
if db = links { return . = JAVASCRIPT ...

2. When I like to change the tinymce-style later, I have to change it in:
admin.pm
add.html
modify.html
tools_validate.html
tools_validate_changes.html

but it would be better to change this only at one point.

Anyway. I hope this discussion help others to find out how they can use
tinymce.

Best regards from
Bremen/Germany

Lothar
Quote Reply
Re: [eljot] CSS Classes in Admin side of Validate/Modify Links In reply to
Quote:
Two reasons:
1. I prefer to load javascript only when I need it.
BTW: The Javascript is on each Admin-Page which has no own template.
Maybe I can use something like
if db = links { return . = JAVASCRIPT ...

Yeah, that makes sense. No point loading it for the hell of it (although, its only in the admin panel, so its not like it will slow down your visitors pages down :))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!