473,756 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Customizing Theme File Processing (more than just .css, .jpg, etc)

Hello,

I'm working with some third-party JS code, such as mootools and
moo.fx, among a few others. They have some really nice "flashy"
features, such as fading from one color to another to bring
attention. I would like to use these settings, but I am currently
restricted to a single theme (more specifically, one color scheme),
because you must specify the start and stop color in JS.

If I could "theme" JS files, then I could create a JS file with a ton
of constants. By creating a .js file in a Theme's directory, it would
register a:
<script type="text/javascript" src="app_themes/theme_name/
file_name.js"></script>

Doing so would act like a .css file except for my .js file. Then in
my file_name.js file:

var FadeFromColor = "FFF";
var FadeToColor = "000";
-----------------------
The above is just an example, of course. Is there any way I can
extend PageTheme to do these types of things? Is there any kind of
PageTheme Provider that I can access?

I've searched all over the net, but I'm unable to find anything. Any
sort of information would be appreciated.

Thank you
-eli

Jun 12 '07 #1
1 1284
For anyone that cares, I gave in and did it OnInit. I would ideally
like to do it through a provider of sorts, but for now this will work:

protected override void OnLoad(EventArg s e)
{
base.OnLoad(e);

if(!string.IsNu llOrEmpty(Page. Theme))
{
DirectoryInfo dir = new
DirectoryInfo(P age.Server.MapP ath(Page.Resolv eUrl("~/App_Themes/" +
Page.Theme)));

FileInfo[] files = dir.GetFiles("* .js",
SearchOption.To pDirectoryOnly) ;

foreach(FileInf o file in files)
{

Page.ClientScri pt.RegisterClie ntScriptInclude (this.GetType() ,
file.Name, Page.ResolveUrl ("~/App_Themes/" + Page.Theme + "/" +
file.Name));
}
}
}

grexi...@gmail. com wrote:
Hello,

I'm working with some third-party JS code, such as mootools and
moo.fx, among a few others. They have some really nice "flashy"
features, such as fading from one color to another to bring
attention. I would like to use these settings, but I am currently
restricted to a single theme (more specifically, one color scheme),
because you must specify the start and stop color in JS.

If I could "theme" JS files, then I could create a JS file with a ton
of constants. By creating a .js file in a Theme's directory, it would
register a:
<script type="text/javascript" src="app_themes/theme_name/
file_name.js"></script>

Doing so would act like a .css file except for my .js file. Then in
my file_name.js file:

var FadeFromColor = "FFF";
var FadeToColor = "000";
-----------------------
The above is just an example, of course. Is there any way I can
extend PageTheme to do these types of things? Is there any kind of
PageTheme Provider that I can access?

I've searched all over the net, but I'm unable to find anything. Any
sort of information would be appreciated.

Thank you
-eli
Jun 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2225
by: jjack100 | last post by:
In asp.net 2.0 you can apply custom themes based on a user profile, etc. And you can change the theme programmatically, etc. But how do you edit or create a theme programmatically? I am working on a content management system where the user needs to be able to select fonts, colors, etc. Right now I can only see how to let the user select from a pre-defined set of themes. In the old days, you could generate the css file from user input...
4
4244
by: Neil Jones | last post by:
Hello, I would like to create my own theme(s) for a couple of my own blog sites. I am hoping a few better themes could bring lot more readers. So far, I have stayed with the default wordpress theme (blue title). There are a lot of web sites I have seen that have very attractive themes. I am not a programmer and do not like to edit the php files or css files etc. My preference is to visually create the theme (font,images,background...
4
2958
by: Neil Jones | last post by:
Hello, I would like to create my own theme(s) for a couple of my own blog sites. I am hoping a few better themes could bring lot more readers. So far, I have stayed with the default wordpress theme (blue title). There are a lot of web sites I have seen that have very attractive themes. I am not a programmer and do not like to edit the php files or css files etc. My preference is to visually create the theme (font,images,background...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10046
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.