Log in

No account? Create an account

Previous Entry | Next Entry

Need Help: Random Movie Quote? - SOLVED!!!

  • Mar. 19th, 2007 at 2:38 PM
I'm switching to Expressive today. I used to use Component and had a random movie quote displayed on that layout (each time the page refreshed, one of one hundred and something random movie quotes I specified was displayed). Is there any way I can do that in a section of one of the columns on my Expressive layout (like in the custom sidebar module with CSS or something)? - SOLVED!!!


( 5 comments — Leave a comment )
Mar. 19th, 2007 08:10 pm (UTC)
Welcome! A brief glance through the tags produced this post, using the same code from Component (redwolf's, which I've edited slightly).
function print_module_customtext(string title, string text, string titlelink_url) {
    var Page p = get_page();
    open_module("customtext", $title, $titlelink_url);
    print safe $*customtext_body;

# random quote script
    var string[] quotes;
    $quotes[size($quotes)]="Lorem ipsum dolor sit amet";
    $quotes[size($quotes)]="Consectetur adipisicing elit";
    $quotes[size($quotes)]="Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua";
    $quotes[size($quotes)]="Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi";
    $quotes[size($quotes)]="Duis aute irure dolor in reprehenderit in voluptate";
    $quotes[size($quotes)]="Excepteur sint occaecat cupidatat non proident";

    var int randquote;
    $randquote = rand(0, ((size $quotes) - 1));

# where random quote lives
    """<div class="widget-list">$quotes[$randquote]</div>""";
To use, enter a title for the Custom Text box, but no content. Edit the function to include however many lines of random text you have.
Mar. 19th, 2007 08:50 pm (UTC)
I'm doing something wrong and can't figure out what. If you don't mind, could you glance at my public layer and see if you notice the error?: http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=8308726 (note: the random movie quote code is the only code there) Perhaps I got too used to Component or something. LOL
Mar. 19th, 2007 08:58 pm (UTC)
Crap. Okay, it works. Sorry about that... but now my style completely changed from "Headphones"? Is there a way to keep the "Headphones" look and use the code? I'm sorry, I'm HORRIBLE when it comes to s2 and math. *sigh*
Mar. 19th, 2007 09:15 pm (UTC)
Now I know where to go to get my movie quotes. Incidentally, the reason I put the [size($quotes)] in the code was so you wouldn't have to manually increment the array number. Too late now.. ;)
Add these lines to the top of your layer:
set base_theme="headphones";
set theme_designer = "Kyle Flood";
set theme_designer_type = "outside";
Mar. 19th, 2007 10:43 pm (UTC)
Thank you!!!
Actually I just kidnapped the quotes straight from my custom layer for Component. I'm glad it blends so well with Expressive. Thank you soooo very much!!! Now I just need to search the tutorials for ways to fix a bunch of other things! LOL
( 5 comments — Leave a comment )

Latest Month

March 2016

S2 Help Communities


Powered by LiveJournal.com
Designed by chasethestars