MassiveFPS
Welcome, Guest
Please Login or Register.    Lost Password?
PHP, anyone? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: PHP, anyone?
#1945
Taiko! (Admin)
Can you break this wood?
Admin
Posts: 571
graph
User Online Now Click here to see the profile of this user
Gender: Male MassiveFPS! Location: Abilene, TX Birthdate: 1982-04-29
PHP, anyone? 10 Months, 2 Weeks ago  
I'm having a little difficulty with some PHP coding of the gamelist's "List" view that I'm working on. I'll post what I'm trying to accomplish and the issue I'm running into, maybe I'll get lucky and someone will chime in.

Here's a quick summary of the gamelist.

Everything in the Gamelist is database driven. Fill in an entry form (for this sake, we'll say entry.php), it goes to the SQL table and shoots back into the gamedetails.php (what you see when you click on a game, with all of the gallery pictures, description, and reviews). It also selects certain values from the entry.php and inputs what I want shown in the card view (ex: view.php)

All of the forms above were created by the same author, so they cooperate nicely together. Except now I have the "list view" (list.php) that I'm trying to make, which is a seperate addon. I've attached the PHP file to this post, as well as the custom CSS I've made.

What I'm trying to accomplish is the option to have images in the list from a value in entry.php. The software I have gives the option to make a "select list"l. I can choose a number of things for a user to choose, and the value that it equals (plain text, no HTML or PHP- that's what it tricky).

For instance, I want to have certain buttons to appear on the list that decribe the genre of the game so it would look something like this.

Choose the appropriate genre traits:
OPTIONS
1) MMO
2) FPS
3) RPG
4) RTS
5) OA

OUTPUT VALUES
1) massive_multiplayer
2) first_person_shooter
3) role_playing
4) real_time_strategy
5) online_action

So let's say they select FPS. The output will show as first_person_shooter in both the details view and the card view. Luckily for me, the output value also shows in the module I have that displays the list.

So I think this PHP code is a matter of manipulating the DATA that is displayed by inserting custom PHP code into the list.php file.

Here's another problem. I know CSS and HTML, but have a primitive understanding of PHP. I guess, that I would write something like:

Code:

<?php if (isset($fieldsObjects['field_selectlist']->data) && if($fieldsObjects['field_selectlist']->data == 'first_person_shooter')){ echo 'myimage.png' }; ?>
This code is just from gathering bits and peices from support forums and what not. Another big question is where I would place this in the list.php. If you've finished reading this and actually understood it, and think you need to see the other forms to actually understand how to put in the right code just let me know and I will attach it. Try not to bust your noggin like I have. *crossing fingers*
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/01/10 20:41 By Taiko!.
  The administrator has disabled public write access.
      Topics Author Date
    thread link
PHP, anyone?
Taiko! 2008/01/10 20:38
    thread link
thread linkthread link Re:PHP, anyone?
Taiko! 2008/01/10 20:40
    thread link
thread linkthread link Re:PHP, anyone?
Taiko! 2008/01/10 20:53
    thread link
thread linkthread link Re:PHP, anyone?
Taiko! 2008/01/12 09:34
    thread link
thread linkthread linkthread link Re:PHP, anyone?
Uriel 2008/01/13 22:41
    thread link
thread linkthread link Re:PHP, anyone?
SilentX 2008/01/17 09:38
    thread link
thread linkthread linkthread link Re:PHP, anyone?
DrDysdy 2008/01/18 20:08
    thread link
thread linkthread link Re:PHP, anyone?
Taiko! 2008/01/18 12:28
    thread link
thread linkthread link Re:PHP, anyone?
Taiko! 2008/01/18 20:36
    thread link
thread linkthread linkthread link Re:PHP, anyone?
SilentX 2008/01/21 01:45
    thread link
thread linkthread link Re:PHP, anyone?
Taiko! 2008/01/21 02:54
    emo
thread linkthread link Re:PHP, anyone?
Necrondo 2008/02/01 00:15
    thread link
thread linkthread link Re:PHP, anyone?
Necrondo 2008/02/01 00:34
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
© 2007 MassiveFPS.com - All Rights Reserved | Link Exchange | Contact Us | Advertise on this site