Go Back   NiceCoder Community Forums > Nicecoder Products > IndexU > v3.2
Register Projects FAQ Members List Mark Forums Read

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2005, 08:57 PM
Registered User
 
Join Date: Nov 2004
Posts: 71
Mythotical is on a distinguished road
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 (permalink)  
Old 02-10-2005, 04:46 AM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
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:
Content visible to License Owner only.
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
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
  #3 (permalink)  
Old 02-10-2005, 09:27 PM
Registered User
 
Join Date: Nov 2004
Posts: 71
Mythotical is on a distinguished road
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 (permalink)  
Old 02-11-2005, 11:07 AM
Active Member
 
Join Date: Nov 2004
Posts: 1,828
inspireme is on a distinguished road
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
__________________
Some interesting INDEXU bits :http://www.indexu.co.uk
Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )
  #5 (permalink)  
Old 02-13-2005, 01:53 AM
Registered User
 
Join Date: Nov 2004
Posts: 71
Mythotical is on a distinguished road
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
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
folder images yankee2002 v5.x 1 08-02-2002 04:26 AM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 01:54 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate