d2jsp
Log InRegister
d2jsp Forums > d2jsp > Site Suggestions > Site Suggestions Archive >
Poll > Orbs Need To Be Recoded (code Provided + Solution) > Let Me Know!
1234Next
Closed New Topic New Poll
  Guests cannot view or vote in polls. Please register or login.
Member
Posts: 3,068
Joined: Dec 15 2007
Gold: 168.00
Aug 21 2009 12:22pm
First of all, Read the whole post before you vote.
For you that dont know coding, this may seem like a lot but its not.

P.S. I realize there is a Complete Guide to bypass with an addon, but some people choose not to install more stuff.

Its fairly easy, however code-wise, sloppy.

First off, I want to tell all IE users that we come in peace, and we will not disrupt your current experience with the orb viewing, We can bypass IE people seeing this code, with:

Quote
<script type="text/javascript">
if (navigator.userAgent.indexOf("Firefox")!=-1)
document.write("<style type="text/css">
  @import url("firefox_orb.css");
</style>")
if (navigator.userAgent.indexOf("MSIE")!=-1)
document.write("<style type="text/css">
  @import url("MSIE_orb.css");
</style>")
</script>


So you need not worry. I'll continue. Here is the current code for the orbs:

Quote
.orb_fem,.orb_flame,.orb_toxin,.orb_frost,.orb_dark,.orb_light {line-height: 2em; white-space: nowrap}
.orb_fem {color: #660099}
.orb_fem:before {color: #CC99FF}
.orb_flame {color: #880000}
.orb_flame:before {color: #FF6666}
.orb_toxin {color: #006600}
.orb_toxin:before {color: #00CC33}
.orb_frost {color: #004499}
.orb_frost:before {color: #0099FF}
.orb_dark {color: white}
.orb_dark:before {color: #666666}
.orb_light {color: #888800}
.orb_light:before {color: #FFFF33}


Or:

Courtesy of the Firefox plugin thread


I am assuming the ones without the suffix ":Before" are the main text, and the one with the ":Before" is the color for glow.

I have achieved a similar effect in firefox:

The glow isnt quite as large as IE, its a demo mind you, and it IS possible to make it similar to how it currently is with tweaking.



In that example, I show that the example is text, and not an image. That effect can be achieved by several spans, overlaying one another. All this current text below will not show on the source code if you use a import css code.

Quote
<style type="text/css">
  /* regular styling stuff */
  h1 {font:30px Arial, Helvetica;color:#000;font-weight:normal;}
  p, ul {font:12px/1.5em Arial, Helvetica, sans-serif;color:#000;}
 
  .shadow { 
  /*position above it's own shadow*/
  position:relative;
  z-index:0;
  }
  .shadow span {
  /*position directly below the text */
  position:absolute;
  z-index:-1;
  top:0; left:0;
  /*lower opacity*/
  opacity:0.10;
  /* disable text-desection */
  -moz-user-select:none;
  }
  /* knockout styles */
  .knockout {color:#fff;}
  .knockout span {color:#000;}
 
  /*positioning all shadows*/
  /* first layer*/
  .shadow .a1, .shadow .a5, .shadow .a7 {left:-1px;}
  .shadow .a2, .shadow .a6, .shadow .a8 {left: 1px;}
  .shadow .a3, .shadow .a5, .shadow .a8 {top :-1px;}
  .shadow .a4, .shadow .a6, .shadow .a7 {top : 1px;}
 
  /* second layer*/
  .shadow .b1, .shadow .b5, .shadow .b7 {left:-2px;}
  .shadow .b2, .shadow .b6, .shadow .b8 {left: 2px;}
  .shadow .b3, .shadow .b5, .shadow .b8 {top :-2px;}
  .shadow .b4, .shadow .b6, .shadow .b7 {top : 2px;}
 
  /* third layer*/
  .shadow .c1, .shadow .c5, .shadow .c7 {left:-3px;}
  .shadow .c2, .shadow .c6, .shadow .c8 {left: 3px;}
  .shadow .c3, .shadow .c5, .shadow .c8 {top :-3px;}
  .shadow .c4, .shadow .c6, .shadow .c7 {top : 3px;}
 
  /* fourth layer*/
  .shadow .d5, .shadow .d7 {left:-4px;}
  .shadow .d6, .shadow .d8 {left: 4px;}
  .shadow .d5, .shadow .d8 {top :-4px;}
  .shadow .d6, .shadow .d7 {top : 4px;}
 
  /* better shadow trick */
  .shadow .d1 {left:-5px;}
  .shadow .d2 {left: 5px;}
  .shadow .d3 {top :-5px;}
  .shadow .d4 {top : 5px;}
</style>


And the Body part:

Quote
<p class="shadow">Kr4t0s Example

<span class="a1">Kr4t0s Example</span>
<span class="a2">Kr4tos Example</span>

<span class="a3">Kr4t0s Example</span>
<span class="a4">Kr4t0s Example</span>
<span class="a5">Kr4t0s Example</span>
<span class="a6">Kr4t0s Example</span>

<span class="a7">Kr4t0s Example</span>
<span class="a8">Kr4t0s Example</span>
</p>


You can change the values, with php strings - In this example Ill use "%User_Orb and %User_Name".

Quote
<p class="shadow">%User_Name

<span class="%User_Orb">%User_Name</span>
<span class="%User_Orb">%User_Name</span>

<span class="%User_Orb">%User_Name</span>
<span class="%User_Orb">%User_Name</span>
<span class="%User_Orb">%User_Name</span>
<span class="%User_Orb">%User_Name</span>

<span class="%User_Orb">%User_Name</span>
<span class="%User_Orb">%User_Name</span>
</p>


As you can see, this method proves beneficial, and does not disrupt IE users from viewing how the orbs currently look.

Im not done yet.

Instead of 8 lines of of code PER username, you can make a simple php query, heres how it would go.

1. The Username is sent to query.php
2. The query checks the username in the database for current orb configuration
3. The query puts the username into the string
4. The query poops out the name with a new php id
5. The forum recalls your username ID

Query.php must make that query EVERY TIME A USER REFRESH.

Of course this is done every refresh. It will cause massive server load, however not as much as its already getting. My suggestion is putting a cache of 48 hours.

Cache = Time before next update (I.e. If you buy an orb you must wait till 48 hours are up till you see it)

This may not be full proof, but it works damnit.

This post was edited by Kr4t0s on Aug 21 2009 12:28pm
Member
Posts: 3,068
Joined: Dec 15 2007
Gold: 168.00
Aug 21 2009 01:05pm
Thank you for voting yes, whoever did. I put alot of effort into my first suggestion.
Banned
Posts: 82
Joined: Jul 27 2009
Gold: 0.00
Aug 21 2009 02:04pm
ROFL
Member
Posts: 8,126
Joined: May 20 2009
Gold: 170.00
Aug 21 2009 02:07pm
uhh sure? doesnt matter to me tbh <-- no orb
Member
Posts: 3,068
Joined: Dec 15 2007
Gold: 168.00
Aug 21 2009 02:20pm
Well I doubt most people understands Web coding, but for those that do should agree with me that this would be a great add-on.
Member
Posts: 3,068
Joined: Dec 15 2007
Gold: 168.00
Aug 21 2009 06:02pm
Who voted no? :[
Member
Posts: 1,937
Joined: Apr 6 2008
Gold: 1.00
Warn: 30%
Aug 21 2009 06:04pm
I am currently using a type of code kinda like yours with my site and orbs are working perfectly in firefox.

Excellent suggestion.

Everything is made for IE hence why some FF users have a hard time browsing some sites and using some features.

This post was edited by Burly on Aug 21 2009 06:05pm
Member
Posts: 57,889
Joined: May 23 2007
Gold: 0.00
Aug 21 2009 06:07pm
i have absolutely no idea when it comes to coding.. but if what you suggested does indeed look like the internet explorer orbs (in firefox) without using the ie add on.. then i say yes...

you should alter this suggestion...when you first started typing make it just say (i can make firefox orbs look like internet orbs) and then type all your technical shit out.... otherwise you're gonna get a lot of no votes.. because we don't know what the fuck you're talking about.
Member
Posts: 3,068
Joined: Dec 15 2007
Gold: 168.00
Aug 21 2009 06:26pm
Quote (Greapper @ Sat, Aug 22 2009, 12:07am)
i have absolutely no idea when it comes to coding.. but if what you suggested does indeed look like the internet explorer orbs (in firefox) without using the ie add on.. then i say yes...

you should alter this suggestion...when you first started typing make it just say (i can make firefox orbs look like internet orbs) and then type all your technical shit out.... otherwise you're gonna get a lot of no votes.. because we don't know what the fuck you're talking about.


I suppose your right, I shouldve but my edit item has passed, oh well best of luck to this suggestion!
Member
Posts: 3,068
Joined: Dec 15 2007
Gold: 168.00
Aug 21 2009 06:41pm
Quote (Burly @ Sat, Aug 22 2009, 12:04am)
I am currently using a type of code kinda like yours with my site and orbs are working perfectly in firefox.

Excellent suggestion.

Everything is made for IE hence why some FF users have a hard time browsing some sites and using some features.


P.S. Are you saying you have a working code? If so why not share source? :)
Go Back To Site Suggestions Archive Topic List
1234Next
Closed New Topic New Poll