• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Anyone know where I can find code to do this?

Visit Yahoo. Notice the 6 icons at the top which you can change. Any idea how they're doing this? Viewing the source of the page doesn't reveal much in the way of readable javascript.
 
It's almost certainly server-side. You send the request to change the icon, it sets your cookie that way, it reads your cookie from then on, and displays the buttons to your preference accordingly.
 
Originally posted by: xtknight
It's almost certainly server-side. You send the request to change the icon, it sets your cookie that way, it reads your cookie from then on, and displays the buttons to your preference accordingly.

So you think it's actually doing a postback to some codebehind?
 
I think xtknight is saying the page possibly is generated server-side based on some cookies you have set (or not set for new users).

edit: I'm fairly certain that's what he's saying.

I'll also throw out the possibility that it is some sort of session variables that are being set (similar to cookies), and saved server-side for a period of time. Possibly only for this session for users who don't have a Yahoo account for example. The page loads, determines your preferences based on the session vars, then shows the proper icons. perhaps people with Yahoo accounts have a database record somewhere that has these icons saved. It's hard to say for sure since all the code is on the back end and we can't see it.
 
Originally posted by: Cheetah8799
I think xtknight is saying the page possibly is generated server-side based on some cookies you have set (or not set for new users).

edit: I'm fairly certain that's what he's saying.

I'll also throw out the possibility that it is some sort of session variables that are being set (similar to cookies), and saved server-side for a period of time. Possibly only for this session for users who don't have a Yahoo account for example. The page loads, determines your preferences based on the session vars, then shows the proper icons. perhaps people with Yahoo accounts have a database record somewhere that has these icons saved. It's hard to say for sure since all the code is on the back end and we can't see it.

So yes, it is posting back to some type of codebehind which changes the cookies or session variables and refreshes the page with the updated icons and links. Crappy.

Any clue where I could find code for doing this? Pretty much any language would be acceptable.. I can translate it into C#.Net
 
you mean the dropdown boxes under the icons, right?

somethign like this, in javascript:
arrowImage.onclick = showlist;

function showlist(){
appropriateList.style.display = box;
}

and then for each element in the list:
thisElement.onclick = setImage();

function setImage(){
imageCorrespondingToThisList.src = "newGraphic.gif";
// Set a cookie here to remember this graphic/choice.
// Setting cookies in javascript is something I don't remember theexact syntax for,
// so you get a comment explaining it instead.
}

I don't se why that's so hard.
 
Yup that's what I'm saying. It's possible with languages like ASP and PHP (server side scripts). It's how a Content Management System (CMS) works. I'm not sure if you can do it (easily or practically) with C# or not. I'd recommend PHP.
 
Originally posted by: xtknight
Originally posted by: notfred
you mean the dropdown boxes under the icons, right?

No he means how you can edit the icons to fit your needs with the small Edit link to the side.

What "edit" link? It doesn't say "edit" anywhere near the top of that page. 😕
 
Originally posted by: notfred
Originally posted by: xtknight
Originally posted by: notfred
you mean the dropdown boxes under the icons, right?

No he means how you can edit the icons to fit your needs with the small Edit link to the side.

What "edit" link? It doesn't say "edit" anywhere near the top of that page. 😕

I think you have to log in, but for some reason my Opera browser shows it anyway.
 
Originally posted by: notfred
Originally posted by: xtknight
Originally posted by: notfred
you mean the dropdown boxes under the icons, right?

No he means how you can edit the icons to fit your needs with the small Edit link to the side.

What "edit" link? It doesn't say "edit" anywhere near the top of that page. 😕

No, you don't have to login. Just click the drop down beside each icon. You can change each one individually.
 
Originally posted by: notfred
you mean the dropdown boxes under the icons, right?

somethign like this, in javascript:
arrowImage.onclick = showlist;

function showlist(){
appropriateList.style.display = box;
}

and then for each element in the list:
thisElement.onclick = setImage();

function setImage(){
imageCorrespondingToThisList.src = "newGraphic.gif";
// Set a cookie here to remember this graphic/choice.
// Setting cookies in javascript is something I don't remember theexact syntax for,
// so you get a comment explaining it instead.
}

I don't se why that's so hard.

Yeah, I figured it was done in javascript, with javascript cookies. Cookies are easy enough to do. I just know enough of functional javascript to build the menus and display them and such.
 
Back
Top