Author |
Topic |
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 15 June 2001 : 20:56:33
|
Simple MOD, was based on the colour template MOD posted here by Podge.
Basically I have removed all the template code and put it in a DB rather than the file. Because of this it is now possible to save your own templates.
To update a previously saved template, just type it's name in the input boox supplied, it will then be updated.To save a new template, just type a new name ine the input box.
Instructions Copy all the files to your forum directory, load admin_mod_dbsetup.asp, and perform the db changes.
It is advisable to delete the dbs_colour_template.asp file when you have finished.
That's it apart from the files Colour Templates MOD
|
|
mfindlay
Junior Member
USA
144 Posts |
Posted - 15 June 2001 : 23:02:16
|
quote:
Simple MOD, was based on the colour template MOD posted here by Podge.
Basically I have removed all the template code and put it in a DB rather than the file. Because of this it is now possible to save your own templates.
To update a previously saved template, just type it's name in the input boox supplied, it will then be updated.To save a new template, just type a new name ine the input box.
Instructions Copy all the files to your forum directory, load admin_mod_dbsetup.asp, and perform the db changes.
It is advisable to delete the dbs_colour_template.asp file when you have finished.
That's it apart from the files Colour Templates MOD
Nicely done! This is VERY handy and makes color configuration actually enjoyable
One thing I have done with my copy is to replace the hard-coded list of templates in the admin_config_colors.asp with a sql query that loads the existing templates from the database:
<select name="select"> <% ' Load the listbox with the available templates 'Select the existing entries On Error Resume Next strSql = "SELECT " & strTablePrefix & "COLOURS.C_TEMPLATE " strSql = strSql & " FROM " & strTablePrefix & "COLOURS ORDER BY C_TEMPLATE" set rs = my_Conn.execute (strSql)
do until rs.EOF Response.Write " <option value=""" & rs("C_TEMPLATE") & """>" & rs("C_TEMPLATE") & "</option>" & vbCrLf rs.movenext loop rs.Close %> </select>
That way each time I save a template it appears in the list next time the page is loaded (which is immediately).
Thanks again for the mod!
Edited by - mfindlay on 16 June 2001 02:55:06
Edited by - mfindlay on 21 June 2001 13:47:02 |
|
|
mfindlay
Junior Member
USA
144 Posts |
Posted - 16 June 2001 : 01:58:29
|
If anyone is interested, I added an additional column to the form in my Font/Table Color Code Configuration (admin_config_colors.asp) that displays in the currently selected color upon page entry.
I found it makes it easier when I can see the currently set colors etc. If you would like to download the form you should be able to replace your form with this.
The only caveat is that I also have the color picker mod installed so you will see the color picker icon missing if you don't have that mod installed, but you can either ignore it or replace all occurrences of <a href="JavaScript:void(0)" onclick="openWindow3('pop_color.asp?box=strPageBGColor')"><img src="icon_color.gif" border="0"></a> with a space and you should be fine.
download: http://www.sagecomputerservices.com/downloads/mycolorform.txt
|
|
|
tomasalsbro
Average Member
Sweden
818 Posts |
Posted - 16 June 2001 : 04:08:51
|
Hi Huw, I think I have followed your instructions and recive this message when trying to save a template: =========== Microsoft JET Database Engine error '80040e37'
The Microsoft Jet database engine cannot find the input table or query 'FORUM_COLOURS'. Make sure it exists and that its name is spelled correctly.
/forum/admin_colour_templates.asp, line 14 ============== By the way - what do you meen with "....and perform the db changes"? Cheers / Tomas
!-Keep distance in traffic-! www.whiplash.pp.se |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 June 2001 : 04:15:20
|
you have not created the database, did you run admin_mod_dbsetup first ?
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 June 2001 : 04:21:28
|
quote:
Nicely done! This is VERY handy and makes color configuration actually enjoyable
One thing I have done with my copy is to replace the hard-coded list of templates in the admin_config_colors.asp with a sql query that loads the existing templates from the database:
<select name="select"> <% ' Load the listbox with the available templates 'Select the existing entries On Error Resume Next strSql = "SELECT " & strTablePrefix & "COLOURS.C_TEMPLATE " strSql = strSql & " FROM " & strTablePrefix & "COLOURS ORDER BY C_TEMPLATE" set rs = my_Conn.execute (strSql)
do until rs.EOF Response.Write " <option value=""" & rs("C_TEMPLATE") & """>" & rs("C_TEMPLATE") & "</option>" & vbCrLf rs.movenext loop rs.Close %> </select>
That way each time I save a template it appears in the list next time the page is loaded (which is immediately).
Thanks again for the mod!
Edited by - mfindlay on 16 June 2001 02:55:06
I knew there was something I had forgotten, thanks, will update my files later today.
|
|
|
tomasalsbro
Average Member
Sweden
818 Posts |
Posted - 16 June 2001 : 04:49:59
|
quote:
you have not created the database, did you run admin_mod_dbsetup first ?
Huw, how do I run admin_mod_dbsetup? When I try it takes me to the Admin Options. What do I do next? Cheers / Tomas
!-Keep distance in traffic-! www.whiplash.pp.se |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 June 2001 : 05:11:02
|
Ok, go to admin_home.asp and login as admin, now load admin_mod_dbsetup.asp
Select the Huws colour mod in the drop down box and hit the button.
admin_mod_dbsetup requires you to be logged in as admin
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 June 2001 : 05:47:53
|
quote:
quote:
Simple MOD, was based on the colour template MOD posted here by Podge.
Basically I have removed all the template code and put it in a DB rather than the file. Because of this it is now possible to save your own templates.
To update a previously saved template, just type it's name in the input boox supplied, it will then be updated.To save a new template, just type a new name ine the input box.
Instructions Copy all the files to your forum directory, load admin_mod_dbsetup.asp, and perform the db changes.
It is advisable to delete the dbs_colour_template.asp file when you have finished.
That's it apart from the files Colour Templates MOD
Nicely done! This is VERY handy and makes color configuration actually enjoyable
One thing I have done with my copy is to replace the hard-coded list of templates in the admin_config_colors.asp with a sql query that loads the existing templates from the database:
<select name="select"> <% ' Load the listbox with the available templates 'Select the existing entries On Error Resume Next strSql = "SELECT " & strTablePrefix & "COLOURS.C_TEMPLATE " strSql = strSql & " FROM " & strTablePrefix & "COLOURS ORDER BY C_TEMPLATE" set rs = my_Conn.execute (strSql)
do until rs.EOF Response.Write " <option value=""" & rs("C_TEMPLATE") & """>" & rs("C_TEMPLATE") & "</option>" & vbCrLf rs.movenext loop rs.Close %> </select>
That way each time I save a template it appears in the list next time the page is loaded (which is immediately).
Thanks again for the mod!
Edited by - mfindlay on 16 June 2001 02:55:06
Now implemented in download files
|
|
|
tomasalsbro
Average Member
Sweden
818 Posts |
Posted - 16 June 2001 : 06:22:31
|
quote:
Ok, go to admin_home.asp and login as admin, now load admin_mod_dbsetup.asp
Select the Huws colour mod in the drop down box and hit the button.
admin_mod_dbsetup requires you to be logged in as admin
OK Huw - done! I was a little bit confused - you use to include a mod_dbsetup.asp file to your mods. Cheers / Tomas
!-Keep distance in traffic-! www.whiplash.pp.se |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 June 2001 : 06:29:23
|
ah yes, it will be included as an admin function in the next release, which is why it is now called admin_mod_dbsetup.asp
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 16 June 2001 : 09:24:39
|
HuwR, you said you updated the files with the code mfindlay provided, but I'm still getting the hardcoded list of templates when I downloaded the mod.
And since it has a Save feature, why not a delete feature too?
Also no nice little message saying "Configuration Posted! Congratulations!" after saving or selecting a template?
=======WARNING======= Christian at the keyboard, You might be saved! =======WARNING=======
Edited by - Davio on 16 June 2001 09:39:30 |
|
|
mfindlay
Junior Member
USA
144 Posts |
Posted - 16 June 2001 : 16:04:21
|
I have made some additions to this fine MOD and updated the Admin Colors panel in general for my own use. If anyone is interested in using them:
1) Load the template list from the database upon entry to the Admin Colors page. 2) Show the list in sorted order. 3) Show the currently used colors next to each setting to help visually see what is currently used. 4) Upon entry to the Admin Colors page, show the currently used template in the template list.
You can download http://www.sagecomputerservices.com/downloads/TemplateHelper.zip
All changes are marked with "BEGIN COLORMOD TEMPLATE"
Note: It requires manually adding an additional field to the config table to store the currently used template so read the included txt file for instructions.
|
|
|
Freeman II
Junior Member
232 Posts |
|
mfindlay
Junior Member
USA
144 Posts |
|
mfindlay
Junior Member
USA
144 Posts |
Posted - 16 June 2001 : 22:13:36
|
I am intrigued by these templates. They can really be a great addition to the forums. Unless anyone knows of anyone else working on export/import of templates, I will proceed with that. It would be cool to be able to have a pool of templates made by various admins available to everyone.
Maybe even expand that to include graphics down the road?
|
|
|
Topic |
|