Results 1 to 14 of 14

Thread: randomly retriving a category from <%$category%>

  1. #1
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default randomly retriving a category from <%$category%>

    Is there any way in smarty to make the <%$category%> return a random category name??

    I want to supply the output to the youtube mod, so that it returns dynamic results everytime, then i could put it on the landing page index.html

    kind regards

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    Not that I'm aware of. However it should be quite easy to randomly select a category using php and RAND

  3. #3
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    I'd be interested in this as well... I'll see what I can do to figure it out, but if you find something echo, please let me know
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  4. #4
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by echo@ View Post
    Is there any way ... return a random category name??
    in browse.php you will see $category_name = $category_obj->GetCategoryName($cat); Use that as your guide.

    use the PHP rand function to get a random number. if there are ANY missing category numbers, you will need to use a while statement to check for missing numbers. Just some ideas. you will need to write the code.



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  5. #5
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    im sorry dudes but its way beyond me,

    I love this MOD but it sucks that you cant grab somthing relevant (to your directory) give it to the youtubeMOD block on the index.html.

    Seems a pity,

    The solution is there, just someone smart has to work out some code to do this.

    If this existed it would make the videos being fetched relevant and dynamic,

    anyone think theres a need for this, or would use it ???

  6. #6
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by echo@ View Post
    If this existed it would make the videos being fetched relevant and dynamic,

    anyone think theres a need for this, or would use it ???
    *raises hand* ME ME ME!!!

    If someone wants to throw out a price to figure this out, and its a reasonable price, I'll pay for it
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  7. #7
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by echo@ View Post
    ...give it to the youtubeMOD block on the index.html.
    sorry, dude, you are just going to have to beat your head against that keyboard a little longer. I don't know what the "youtubeMOD" is....



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  8. #8
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by esm View Post
    sorry, dude, you are just going to have to beat your head against that keyboard a little longer. I don't know what the "youtubeMOD" is....



    .
    Zubby created a YouTube MOD. You can find it on IndexUDirectory.com
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  9. #9
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by FSGDAG View Post
    Zubby created a YouTube MOD. You can find it on IndexUDirectory.com

    Sorry, dude, don't think I want to spend $34.99 to find out what it is...!!!

    BTW: WTF is the deal with the 99 pennies....? Just make the damn price $35...!!! sheesh!!!!


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  10. #10
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Talking

    Well i disagree with you on that , the price is well worth a years subscription , probally not enough considering theres practically 50 mods avalible.
    Let alone a great resource to the indexu script, i have to say zubby knows the script like the back of his hand and his response times are quick! normally with code / answer !
    Also if you have a MOD suggestion thats good he'll put it together for you


    So anyway back to the thread / problem.

    I emailed zubby the thread last night and lone behold he has emailed me back the code to do this, so im gonna test now, (and also donate)

    Done this for free, blimey what a god.

    FSGDAG ask zubby for the code hope he adds this to the youtube mod on his website.

  11. #11
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    Works very well

    Kick Ass

  12. #12
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by echo@ View Post
    Well i disagree with you on that , the price is well worth a years subscription , probally not enough considering theres practically 50 mods avalible.
    Let alone a great resource to the indexu script, i have to say zubby knows the script like the back of his hand and his response times are quick! normally with code / answer !
    Actually, I did look at the MODs at zubby's site and I would agree with you. If you are not a coder.

    of the ones that interested me, I've already done several of them for v3.2 (and updating them for v5 would not be difficult, if any updating is even necesarry).

    I think zubby is the one that made most of the improvements for v5. So I wonder why he is no longer doing it...?

    But ultimately the reason for not spending the money is: I don't have any sites running INDEXU.



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  13. #13
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    Quote Originally Posted by echo@ View Post
    Works very well

    Kick Ass
    WAHOOO!!!!!!!! Just sent the e-mail off to Zubby!

    ESM, I dont know either why Zubby isn't 'offically' with NiceCoder anymore, but frankly, I could care less... Infact, I'm happy about he's not!! Thats not a dig on anyone, but IndexUDirectory has been a GREAT resource for people like me and I'm EXTREMELY grateful for it.

    I will say this ( going a little off topic here ), I would love to learn PHP as well as ESM, Zubby, Inspireme, mpdaddy, Bruce, etc. Infact, its in the top 5 of the high priority list of things for me to accomplish But I've got a 3 and 1 year old, I've got a wife who weirdly enough actually wants me around , I own C-4 Hosting, AND I'm a network engineer. So unfortunately, that will have to wait for just a little more time.
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  14. #14
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    It's public knowledge and has been said on the forum before that Zubby is no longer with Nicecoder. I dont know why, and I don't care why.

Similar Threads

  1. Replies: 2
    Last Post: 01-02-2008, 07:25 AM
  2. Category
    By Antony in forum Blocks and Modification
    Replies: 6
    Last Post: 12-18-2006, 04:52 AM
  3. randomly sorted listings
    By romow in forum v5.x
    Replies: 10
    Last Post: 11-27-2006, 10:32 PM
  4. Replies: 6
    Last Post: 06-02-2005, 09:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •