Logged Out
Create an Account
Login:
Password:

Forgot your password?
What is overriding my styles

What is overriding my styles
[Back to Index]  [Bottom of Thread]
Thread Tags
Primary: [Advanced Layout]
Secondary: None
1 2 >>>
EDIT:
As I was a little over the top in my critizement I have just edited it all out.

I explain the problem and the solution in my next post in this thread
Did you come from the Blizzard forums? I'm here to help, man. No reason to be hostile.

Would you mind pointing me toward your site, and/or attach your code so that I can see what you mean. Because, as it stands, there is nothing on the site color-wise that is unconfigurable (Except the Alert Box).


Edit: Thinking further, I bet I know what's up. My guess is you haven't changed the default stylesheet yet. You'll want to do that.

Look for the following tag:

<link rel="stylesheet" href="style.php" type="text/css">

Change "style.php" to the location of your own custom stylesheet.



--
It's all in the reflexes.
Quote by Kriknosnah
Ok, lets get the initial question out of the way, yes I am hacking your ugly code.

Now, to your problem. In order to make my guilds site look like it wasn't designed by a 15 year old I have had eliminate serveral of the <!--XXX.XXX--> tags and had to hard code, specifically, the menus. The menus are dynamic and they dropdown/popup when moused over (which I only got to work right by setting the main body/content to a -10000 z-index ). The next moronic thing I am trying to figuring out is, why when I set each menu headers and the subsequent link colors using the <style> tags is something overriding them and making them red. I have checked and/or removed from the default.css any table, td, tr, div, and a, styles and none of them solved the problem. I even went as far as to change any and all redish colors to white and it didn't work. I also checked, as best I could, and made sure all my id and class tags did not conflict with any of yours. The only thing that works is if I set the sytle directly at each tag for the menu headers and subsequent links and to do that for all of them is a major pain in the rear.

Please disable/fix your stupid code asap so I can try and make our site look half way presentable.


I'd say this is a customer you don't need Chops, he seems like a jerk. If he's such the wonderkid he should be able to figure that stuff out for himself anyway.
Did my suggestion help?

--
It's all in the reflexes.
What a fabulous way to ask for assistance.

"You suck! Oh, and can I get your help really quickly?"
Sorry, about the attack I am of a cooler head now that I have found away to use javascript to strip all the parts of the site out into arrays and then apply my styles and layout, this would include all the hard coded CSS not in the default.css file (you might want to fix that to make this proccess a little easier).

Just so you know that the problem was in the instruction you give:

<!--style.php on the root is the default, and if you'd like to use this css unmodified, you're free to. Remember ALL paths in this file are relative to the root, however, most custom files will be loaded into the /settings/mysubdomain/files directory. -->


Just for reference, http://mysubdomain.dkpsystem.com/settings/mysubdomain/files/mysites.css will not use my new CSS file it will default to the style.php. You need to change the instructions to tell us to link to http://dkpfiles.com/mysubdomain/files/mysites.css

Now, I have one last issue (I hope) that I need solved and that is all the links to the different "stand alone" menus. Here's my best guesses only the calandar and server status seem to show up.


<!-- System:Calendar --><br>
<!-- System:Recruiting --><br>
<!-- System:VentriloStatus --><br>
<!-- System:ItemsReceived --><br>
<!-- System:ShoutBox --><br>
<!-- System:CurrentMembersOnline --><br>
<!-- System:ServerStatus --><br>
<!-- System:RaidProgression -->


It would help the correct links these were posted somewhere.
That's cool. Apology accepted, but please, for the future, realize that while I'm here to help because it's my business, you'll get a lot more positive help if you are more cordial. It's usually as simple as saying "This isn't working, here's my code, could you let me know if I'm missing something?"

Quote by Kriknosnah

Just for reference, http://mysubdomain.dkpsystem.com/settings/mysubdomain/files/mysites.css will not use my new CSS file it will default to the style.php. You need to change the instructions to tell us to link to http://dkpfiles.com/mysubdomain/files/mysites.css


That's odd. While I realize that the address in the documentation is different, that should be irrelevant, as the address listed redirects to the proper location.

For example, see http://www.poopinashoe.com . And look at the code there. You'll see that the stylesheet referenced is like this:

<link rel=stylesheet href="settings/pias/files/style.css" type="text/css"> and that DOES work (and always has), even though the file will redirect to the dkpfiles.com location.

If you could post the code that you had used before, I'd happily look over it and see if there is a bug in my system, or it's just an unnoticed typo in your code (hey, we all do it, just look at this thread for example)

Quote
Now, I have one last issue (I hope) that I need solved and that is all the links to the different "stand alone" menus. Here's my best guesses only the calandar and server status seem to show up.
<!-- System:Calendar --><br>
<!-- System:Recruiting --><br>
<!-- System:VentriloStatus --><br>
<!-- System:ItemsReceived --><br>
<!-- System:ShoutBox --><br>
<!-- System:CurrentMembersOnline --><br>
<!-- System:ServerStatus --><br>
<!-- System:RaidProgression -->


The thing that's missing is this: <!--System:Menu:XYZ-->

The Calendar and Online don't need it, and ServerStatus will display without the Menu (just on it's own), same with the Items Received.

The way to change most of that would be to first look at the Name of the Menu Category (this is found from the Menu Administration) section of your admin menu, and then to use the format

<!--System:Menu:Ventrilo Status-->

So your code snippet would be modified as follows:

<!-- System:Calendar --><br>
<!-- System:Menu:Recruiting --><br>
<!-- System:Menu:Ventrilo Status --><br>
<!-- System:Menu:Items Received--><br>
<!-- System:Menu:Shout Box --><br>
<!-- System:Online--><br>
<!-- System:Menu:Server Status --><br>
<!-- System:Menu:Raid Progression -->


(Also, note, that anything of the "System:Menu:XYZ" syntax requires the "XYZ" text to match the name of the menu category from the Menu Administration section. so if your "Raid progression" menu is called "ZOMG WE KILL STUFF" you'd make the call <!--System:Menu:ZOMG WE KILL STUFF-->

Also, the system is kind of in a transition from an older version of the Advanced Layout Options, to a newer version, so there may be some ambiguity between options (particularly for backwards compatibility - I don't want to break existing sites, ya know?)


Anyway, please try to remember that anyone participating on this forum does so on a volunteer basis except for me, and while I'll typically respond to every question I can, I have no obligation to help someone who decides to insult me and my business, so try to keep your requests cordial. I recognize that sometimes things get frustrating, and if you have beef with a way that something is done, it's unquestionably more contructive to say "Hey, this particular thing isn't working, you could try doing it this way, rather than that way" as opposed to saying "fix your stupid code" (Especially when plenty of other sites have succeeded in working with the system to completely modify their layouts - see the Featured Sites on the left).

I think you'll find I'm more conducive to constructive criticism and suggestions than pretty much any company you've ever worked with.

--
It's all in the reflexes.
Quote by Chops

That's odd. While I realize that the address in the documentation is different, that should be irrelevant, as the address listed redirects to the proper location.

For example, see http://www.poopinashoe.com . And look at the code there. You'll see that the stylesheet referenced is like this:

<link rel=stylesheet href="settings/pias/files/style.css" type="text/css">and that DOES work (and always has), even though the file will redirect to the dkpfiles.com location.

If you could post the code that you had used before, I'd happily look over it and see if there is a bug in my system, or it's just an unnoticed typo in your code (hey, we all do it, just look at this thread for example)


Sorry, the code I was using is long gone. I had the exact same thing as you have (with the obvious difference in the subdomain name and css file name) and the way I spoted the problem was by having one of my colleagues look at the code he noticed the file's location in the "File Administration" was different than what I had entered. When I changed were the <link> pointed to, it fixed the problem. I can't explain it but it worked.

Quote by Chops

<!-- System:Calendar --><br>
<!-- System:Menu:Recruiting --><br>
<!-- System:Menu:Ventrilo Status --><br>
<!-- System:Menu:Items Received--><br>
<!-- System:Menu:Shout Box --><br>
<!-- System:Online--><br>
<!-- System:Menu:Server Status --><br>
<!-- System:Menu:Raid Progression -->


I had tried putting the "Menu" into the tag but my problem was I didn't realize that you had to leave the spaces in the menus name.
I think once you get settled in and comfortable you'll find that there are several people on these boards that enjoy helping whenever they can. They range from people that are web apps developers to people that just fiddle with every little feature that Chops makes available to learn how to use them and tweak them to our needs. Overall I'm certain for the most part you'll find were a good group and a helpful community.

--
Six Demon BagRefresh This Item
Jack Burton: Hey, what more can a guy ask for?
Egg Shen: Oh, a six-demon bag!
Jack Burton: Terrific, a six-demon bag. Sensational. What's in it, Egg?
Egg Shen: Wind, fire, all that kind of thing!
Well, Saudorun I think I may have to take you up on that offer.

Well, I guess it isn't really an offer but it made me think that posibly someone might have already done this and it would save me a lot of time if someone has the code.

Basically what I am working on doing is tearing apart the <!--System:Login--> code, that is "dynamically" included. I am aware that the basic formating for it is in the "menupage.htm" but parts of it have their "styles" hard coded or have no styles. And besides I will use the "menupage.htm" page to format the rest of the "stand alones", which will be designed to colapse into a 20 pixel column on the left of the page below the header and the login will be position along the top of the page and to the right.

I am somewhat familiar with regex in PHP which will also work in javascript but I have never had a reason to use it to this major of an extent, as I always had access to the very core files of a site. My other thought was to use "getElementByTagName" along with "className". but as my javascript is very old and rust, I will have to spend a hugh amount of time learning it and debuging it. If someone has done this I would love to see your code. I know regex is the better choose as it will load faster but I may not have a choose in what I use.


It's interesting that you would mention this with the login stuff.

I've had plans on implementing the ability to completely rework the login information as well with more commands to place login information accordingly. At the moment, it's kind of dangerous to rip apart the login box with regexes simply because it CAN change, and that could throw off your regex, rendering your site incapable of accepting a login.

I've got a lot of new commands I'm implementing to accommodate template system that's getting rolled out soon.

--
It's all in the reflexes.
That does present a small dilema.

After some thought I can turn the entire menupage.htm into a javascript that use document.write with some "if" "else" coding. The real problem that I was trying to over come with my previous post is I need to change the styles for all of the <a href=""> and none of them have id or class tags and I do not want them all to look the same.

Also just in the login include (the other "stand alones" are worse) there are these (below) hard coded styles that should be coded in the style sheet.


<center style="font-size:8pt">
<a href='javascript:enablerankchallenge()' style='font-size:7.5pt;font-weight:normal'>
<center style="font-size:8pt;font-weight:bold">
<td class=plain style="font-size:7pt">
<div id=createcharform style="display:none">
<input type=button class=button value="Go" style="font-size:7pt" onClick="createchar()">


I guess it is possible that you could be using php to dynamically include those styles but it would be easier for us if there was a dynamically included id or class tag and then we could edit them to our needs

Also found a this mistake, 2 "name" tags in the following code.


<input type=text name=createname id=createname class=xsmall name=name value="" size=8>



Just though I should ask this because by the time I get to it later you may beable to answer and save me some time (and headach).

If I take and write some javascript like so (in the menupage.htm):


<script type="text/javascript" language="javascript">
if (<!-- Menu:Title --> == "Logged Out"){
document.write "something";
}
else if (<!-- Menu:Title --> == some variable) {
document.write "something";
}
else {
document.write "something else";
}
</script>



Will your code still work and replace the "<!-- Menu:Title -->" in the javascript?
It certainly will work like that. Just make sure you add quotes around <!--Menu:Title--> in the javascript, otherwise, it would generated code like this:

if(Logged Out == "Logged Out")

which would definitely throw a syntax error.

--
It's all in the reflexes.
Yea started working with it and it will be something like this:


<script type="text/javascript" language="javascript">
var logged = "<!-- Menu:Title -->"
var change = logged.replace(/: /, ",").split(",");
var loggedin = (change[0]);

if (logged == "Logged Out"){
document.write(
"<style type='text/css'> A \{font-size: 12px; color: #000000; text-decoration: none; \}</style>" );


}
else if (loggedin == "Logged in"){
document.write(
"<style type='text/css'> A \{font-size: 12px; color: #000000; text-decoration: none; \}</style>" );

}
else if (logged == "Server Status"){
document.write(
"<style type='text/css'> A \{font-size: 12px; color: #000000; text-decoration: none; \}</style>" );
}
else {
document.write(
"<style type='text/css'> A \{font-size: 12px; color: #000000; text-decoration: none; \}</style>" );
}
</script>


As you can see I can (using a poor technique) change how links are formated, per menu if I want. Also to keep the last style from effecting how links in the "content" are shown, I will set an additional style after the last menu for any links in the "content".

You can also probably guess I am going to move the "Server Status" menu.


I have managed to work out all of the code to get what I need to work. The problem I am running into is non-uniform coding techniques in the code that must be dynamically included from the database or other files that I can not edit.

For example:

<center style="font-size:8pt">
<i>Class Officer</i>
<a href='javascript:enablerankchallenge()' style='font-size:7.5pt;font-weight:normal'>Wrong?</a><br>
<A href="editprofile.php">Edit Your Account Info</a><br>
<A href="viewprofile.php?loginid=15">View your Account Profile</a>
<br><a href="myavailability.php">Edit your Availability for Raids</a>


</center>
<center style="font-size:8pt;font-weight:bold">My Character Profiles:</center>
<table cellspacing=0 cellpadding=0 border=0 align=center><tr><td class=plain style="font-size:7pt">
<a href='memberprofile.php?memberid=33'>Kriknosnah(70)</a><br><a href='memberprofile.php?memberid=42'>Zithril(50)</a><br> </td></tr></table> <center>
<a id=createchartext href="javascript:enablecreatechar(1)">[Create a Character]</A>
<div id=createcharform style="display:none">
<center>
Name:
<input type=text name=createname id=createname class=xsmall name=name value="" size=8>
<input type=button class=button value="Go" style="font-size:7pt" onClick="createchar()"><br>
<a href="javascript:enablecreatechar(0)">[Cancel]</a>
</center>
</div>
</center>
<center><a href="logout.php">Log out</a></center>


In line one the value of the style tag is in double quotes (" "). But the value of the style tage in line 3 is in single quotes (' '). And line 17 has no quotes for any of the values there except the "value" which has no value.

So when I do code like so

<script type="text/javascript" language="javascript">
var MenusTitle = "<!-- Menu:Title -->";
var change = MenusTitle.split(":");
var loggedin = (change[0]);


var NewContent = "<!-- Menu:StandAloneContent -->".replace(/\r/gm, " ");
var StartContent = "<!-- Menu:StartStandAlone -->";
var EndContent = "<!-- Menu:EndStandAlone -->";

var StartLists = "<!-- Menu:StartItemList -->";
var EndLists = "<!-- Menu:StartItemList -->";

var StartItems = "<!-- Menu:StartItem -->";
var EndItems = "<!-- Menu:EndItem -->";

var ItemsLink = "<!-- Menu:Link -->";
var ItemsPopup = "<!--Menu opup -->";
var LinksDesription = "<!-- Menu:LinkName -->";


if (MenusTitle == "Logged Out"){
LoggedOutMenu()
}
else if (loggedin == "Logged in"){
LoggedInMenu()
}
else if (MenusTitle == "Server Status"){
ServerStatusMenu()
}
else {
AllOtherMenus()
}
</script>


I can not use double quotes (" ") or single quotes (' ')
to parse your dynamically included code because all I will get is errors.
This would be a little rough, but you could do it this way, and it would guarantee work with whatever I threw at it.

Something like



<div id="<!--Menu:Title-->_standalone"><!--Menu:StandAloneContent--></div>

<script language=javascript>
var NewContent = document.getElementbyId("<!--Menu:Title-->_standalone").innerHTML;
</script>


That would work for the NewContent variable you used there, and for pretty much anything. It would throw a fit, however, if Menu:Title had a quote in it.

--
It's all in the reflexes.
Hmm, I'm not seeing how that will help, may be I'm just missing it.

Quote by Chops

It would throw a fit, however, if Menu:Title had a quote in it.


Yea, that's my problem. The value of <!--Menu:StandAloneContent--> has quotes in it, which is throwing errors when I try to put it into a variable.
I'll give an example of how and why it works for everything as long as <!--Menu:Title--> (and only menu:title) doesn't have a quote in it.


The example I gave was this:

<div id="<!--Menu:Title-->_standalone"><!--Menu:StandAloneContent--></div>

<script language=javascript>
var NewContent = document.getElementbyId("<!--Menu:Title-->_standalone").innerHTML;
</script>


Replacing it with actual sample values, this is what it would yield:

<div id="Vent Status_standalone" style="display:none">
<img src="ventsomething.gif">My Vent Server<br>
<img src='ventchannel.gif'>Super Fun Channel<br>
<img src="ventmember.gif">Chops<br>

...

</div>

<script language=javascript>
var NewContent = document.getElementbyId("Vent Status_standalone").innerHTML;
</script>


The NewContent variable would contain the HTML contents of the div with id "Vent Status_standalone".

As long as my code doesn't have an unclosed <div> in it, it will work properly, regardless of the contents of the standalone menu without needing the quotes to be escaped.

The "innerHTML" property of tags will return the HTML between the opening and closing tags of the referenced thing.

--
It's all in the reflexes.
doh

Man I can be dense.

Be staring at a ton of ways to use "document." to solve the problem and in particular the document.getElementbyId and some how I missed that. Even some of the uses/examples I saw had the .innerHTML.

I'll give that a try and see how it works.


1 2 >>>
[Back to Index]  [Top of Thread]