ScotchBonnet
Scotchsour's Place for Layouts, Codes, Icons, Mood Themes...
Previous Entry
(Paid) Randomized User Pictures (SS/RR) 
Next Entry
22nd-Dec-2007 09:17 pm
This is for my own purpose but it might be useful to somebody else.



This tutorial explains how to randomize user picture which displays in the profile box in the sidebar. The code to do this will override the Page::lay_print_sidebar_profile(). You will need to place the coding in a theme layer. If you already have a theme layer for the Smooth Sailing style, you can edit it to include this code. Otherwise, you need to create one as explained in the Theme Layer tutorial.

You will need to copy the following code into your theme layer, making sure to include everything:

function Page::lay_print_sidebar_profile() {

var string[] pic;

$pic[size($pic)]="http://www.insanejournal.com/userpic/######/######";
$pic[size($pic)]="http://www.insanejournal.com/userpic/######/######";
$pic[size($pic)]="http://www.insanejournal.com/userpic/######/######";
$pic[size($pic)]="http://www.insanejournal.com/userpic/######/######";
$pic[size($pic)]="http://www.insanejournal.com/userpic/######/######";
$pic[size($pic)]="http://www.insanejournal.com/userpic/######/######";

var int randpic;
$randpic = rand(0, ((size $pic) - 1));

$this->lay_print_sidebox_top($*text_sidebox_profile_title);
"""


$*text_sidebox_profile_userlabel$.journal

$*text_sidebox_profile_namelabel$.journal.name

""";
if ($*text_sidebox_profile_info!="") { """
"""; print $*text_sidebox_profile_info; """
"""; }
"""

""";
$this->lay_print_sidebox_bottom();
}



In the above code, you need to replace http://www.insanejournal.com/userpic/######/###### (for each) with the user pictures that you'd like to be randomized. Please notice that, though six user pictures are used here, there is no maximum or minimum to the number of user pictures that you can use.

Once you have finished adding the code above, you can save your theme layer by clicking on the "Save & Compile" button at the top of the screen. Your changes will not take effect until you apply your theme layer by selecting it on the Customize Journal page.

Originally posted: Here
chipper
Comments 
23rd-Dec-2007 06:30 pm (UTC)
Hi--I found your IJ when I searched for "layouts." I'm having trouble finding a pre-made layout among those IJ offers that meets all my needs. I like your Baroque layout very well, but the one you're currently using (rounded rectangles?) is really nice, and contains some of the elements I like in a layout.

Three things I'm looking for in a layout are: navigation bar at the top and the bottom of the pages; icons included in every post on friends page and entries page; and a place to put a banner at the top.

I know *nothing* about coding, other than the little bit one learns using IJ/LJ and customizing using S2. Could you point me toward someplace that might help me? Where did you find Rounded Rectangles?

Sorry to be a bug, but I love IJ--and I want to love my journal layout, too. Thanks for any help you can give, and have a good winter holiday.
24th-Dec-2007 02:13 am (UTC)
Hey! you caught me. :)

Believe me I know it is hard finding layouts, probably why I have layouts working for the next year. Thanks about the "Baroque". RR is a layout in LJ that is extension of Smoothsailing by masterslaker. RR can be found at the designer's journal here.

Now the hard part:
One: RR rounded parts comes from mine (livejournal's) scrapbook. Where a paid or permanent member can store images. The designer told me that they way scrapbook handles the rounded corners is the reason the rounded edges work with any color you input.

Two: RR isn't coded for IJ, I actually had to remove parts of the code to make it work here for my own benefit. And I am still working with this layout to my specifications.

So this version while pretty isn't really available unless you know what you are doing and have a LJ.

Where you can go? If you have a LJ account, you could try freelayouts and if you need help with it go to Everything LJ.

I know there is version of freelayouts here too and you could try them. I really won't be able to start any new layouts until the new year except perfecting baroque for IE6 and below. I think my next one is for either flexible squares or Libra but by then I could help you if you like it. Check the previews button on top for any further developments.

Not a bug. I am glad you stopped by. I will passing here tonight as in the next day I will be off to NYC. So if you see something you like that may work for your journal, ask me while I am here.
24th-Dec-2007 03:20 am (UTC)
Hey! Thanks for your interest. I'll take a look at the blogs you recommend.
Code by masterslacker. Fiddled by userinfoscotchsour. This page was loaded on May 8th 2024, 1:00 pm GMT.