Results 1 to 5 of 5

Thread: Add people's choice & RPG Award images

  1. #1
    Join Date
    Nov 2004
    Posts
    71

    Default Add people's choice & RPG Award images

    I would like to know if there is a way so I can add in people's choice and RPG award images. It would be selected by the editor when they are editing a link or approving a link. The admin has full control over it and the image would show up next to the description, I would setup more pages for this, such as People's Choice page and RPG Award page. It would call all links with certain awards to be placed on each page under whichever section it belongs. Has this been done yet?

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    alter > add fields in the database for each award, data type varchar, default as "no"

    You need to stop using custom field forms on add and modify else the user will be able to add awards themselves.

    Now the easiest thing is to type "yes" in each award field when you modify or add a link or

    Where you want the award to show you could do this :

    Code:
    < img src="../images/award1/<%database-name-for-award1%>.jpg">
    now just put award 1 in the following location : images/award1/yes.jpg and no.jpg in the same place

    if award = yes the image will show, if not then no.jpg will show. You could make no.jpg a 1x1 transparent image.

    thats the easiest way, you could add checkboxes to make it all a little easier
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  3. #3
    Join Date
    Nov 2004
    Posts
    71

    Default

    Woah, you lost me already. LOL Gotta take it slow with my brain when it comes to custom coding. My mind works faster than my hands when I do code but when reading, my mind is just slow. LOL

    Ok I don't use custom field forms at all...or at least I don't think I do.

    Ok so I should add new fields in the database like so:
    Name
    Type
    Varchar
    and so on. Thats where I'm lost and the line you gave me above goes in what template? Or would that go in the template I make for my custom pages?

    Thanks for the help
    Steve

  4. #4
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    Ok sorry, im not very good at typing or explaining myself, i will try harder!

    Basically you add a field in your database for each award. eg. Award1, Award2, Award3. Make the field type "varchar", make the default "no"

    Thats your database setup.

    now create the images, call one of them award1-no.jpg and another award1-yes.jpg The no image could be a grayed out award to show they dont have that yet, or a 1x1 transparent gif. upload these to your image folder.

    now wherever you put this code in your templates <%award1%> it will either display the text "no" or "yes" depending on wether you have given them the award. But you want to display the image, this is why we called the images award1-no or award1-yes

    You can make the image display by using the following in a template :
    <img src="../images/award1-<%award1%>">

    as you can see this will either load award1-no.jpg (no image displays) or
    it loads award1-yes.jpg (award appears)

    Thats basically how i would go about it. You can use the same technique to do all sortd of clever things like loading different detail pages depending on if a listing is "paid" or "basic"

    Im working on this for my site now

    Hope that helps, sitemail me or add me to a instant chat if your stuck
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  5. #5
    Join Date
    Nov 2004
    Posts
    71

    Default

    Thanks, now that explains it alot better. I will give it a shot probably in the next few days. I have you added to my lists for messengers, I am GlobalRPGs on AIM, mythotical@malvaria.com for MSN, and mythotical82 for YIM, don't remember my ICQ #. LOL Thanks again.

    Myth

Similar Threads

  1. folder images
    By yankee2002 in forum v5.x
    Replies: 1
    Last Post: 08-02-2002, 03:26 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
  •