Jump to content

Jim R

Members
  • Posts

    988
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jim R

  1. Yes, but that just takes you to the page. I just want to extract or parse the user edited information. The Wiki URL looks like this actually pathway/index.php?title=wordA_wordB_wordC. In my case it's nameFirst_nameLast, which takes the user to a page with essentially a profile on that player, edited by the users. I'd like to just use the profile part.
  2. Ken, this is related to the topic you've responded to of mine over on the MySQL board. Here is the code: echo '<tr> <td>'. $line['deviation'] . '</td> <td><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'" class="thickbox" >'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td> </tr>';} In each instance, I'm creating a link with a Thickbox class, and I'd like to display the content of the Wiki page in the Thickbox rather than go to the page. However, I just want the user generated content from the Wiki page. Perhaps, the link instead links to a URL which parses and echoes content from the Wiki page. Just not sure how to do that.
  3. The "code" is already up there, and it has plenty of queries, exactly three. That's the point. Is there a more concise way of doing it? The answer is probably yes, which is why I'm asking. Ken, I no longer have the example I referred to because it wasn't yielding what I wanted.
  4. Here is where the newbie in me comes out. I'm a basketball coach with an English degree, so terminology is very important to me. In theory, am I looking for something that "parses" the information I want? (as opposed to extracts it)
  5. Any more detailed advice on how to go about that? I've tweaked a lot of SSI stuff on my SMF forum, so I can picture in my mind what you're saying, but SMF sets up most of that code. I just tinker with it. What direction should I go in regards to my Wiki?
  6. I'm using a jquery modal window (Thickbox or another one). What I'd like to do with my PHP code is when the link clicked on, the content that shows up is just the content portion of my Wiki page--the part that actually is "edited". No menus. No navigation. Just the part I or a user would type.
  7. I'm not sure of the logic of the code as you describe it. I tried to do them all with the same SQL (before I switched what section 2 queried), and it printed the Header for the second section every time too.
  8. Is that the best way to do that? They are all confined in one table.
  9. I actually came back to post the updated code. Sorry about that. Basically, I have three different queries(?) with three different SELECTS. (Not sure of the terminology.) <?php mysql_select_db("jwrbloom_hhr"); echo '<table class="playerTable" width="100%"> <thead> <tr> <th>#</th> <th>Top 10</th> <th>HT</th> <th>Level</th> <th>City (School)</th> <th>College</th> </tr> </thead> <tfoot> <tr> <td colspan="6" align="right">(+) moved up; (d) debut; (s) switched from another position</td> </tr> <tr> <td colspan="6" align="right">Colleges in bold print means committed</td> </tr> </tfoot> <tbody> '; $query = 'SELECT * FROM class2010 ORDER BY rankPOS ASC'; $results = mysql_query($query); while($line = mysql_fetch_assoc($results)) { if ($line['group'] == 1) { echo '<tr> <td>'. $line['rankPos'] . $line['deviation'] . '</td> <td><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'" class="thickbox">'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td> <td><center>'. $line['height'] . '</center></td> <td><center>'. $line['level'] . '</center></td> <td>'. $line['hschool'] . '</td> <td>'. $line['college'] . '</td> </tr>';} } echo ' <tr> <td class="playerTable_head" colspan="6">The Best of the Rest</td> </tr>'; $query = 'SELECT * FROM class2010 ORDER BY nameLast ASC'; $results = mysql_query($query); while($line = mysql_fetch_assoc($results)) if ($line['group'] == 2) { echo '<tr> <td>'. $line['deviation'] . '</td> <td><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'" class="thickbox" >'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td> <td><center>'. $line['height'] . '</center></td> <td><center>'. $line['level'] . '</center></td> <td>'. $line['hschool'] . '</td> <td>'. $line['college'] . '</td> </tr>';} echo ' <tr> <td class="playerTable_head" colspan="6">Names To Know</td> </tr>'; $query = 'SELECT * FROM class2010 ORDER BY nameLast ASC'; $results = mysql_query($query); while($line = mysql_fetch_assoc($results)) if ($line['group'] == 3) { echo '<tr> <td>'. $line['deviation'] . '</td> <td><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'" class="thickbox" >'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td> <td><center>'. $line['height'] . '</center></td> <td><center>'. $line['level'] . '</center></td> <td>'. $line['hschool'] . '</td> <td>'. $line['college'] . '</td> </tr>';} echo '</tbody></table>'; ?>
  10. Can I continue this topic a little further? I know enough PHP to tinker with echo statements, but as for writing my own, my brain no longer functions with that kind of logic. As I'm dealing with "IF" commands, what I posted above, I have three separate sections from the same database. Section 1 is posted above, and as you can see the output is in a table. I will continue the table for sections 2 and 3. Should I repeat what I have above for sections 2 and 3, or is there a way of IF....AND...AND...? I don't think it's IF/else.
  11. Apparently Google doesn't like everybody... It usually likes me, but I was searching for equal signs, not comparative operators.
  12. Very nice. The == worked. The === yielded no results. At the risk of sounding lazy, what is the difference? I always thought == meant it didn't equal. I Googled it, but it didn't come up because they aren't words.
  13. Ok. I'm stuck on this. Why is the below not working? FYI, I have tried it with =1 and ="1". It still produces the same results, which is just printing the entire list. I"m not getting any errors. $query = 'SELECT * FROM class2010 ORDER BY rankPOS ASC'; $results = mysql_query($query); while($line = mysql_fetch_assoc($results)) { if ($line['group'] = "1") {echo '<tr> <td valign="top">'. $line['rankPos'] . $line['deviation'] . '</td> <td valign="top"><a href="/wiki/index.php?title=' . $line['nameFirst'] . '_' . $line['nameLast'] .'">'. $line['nameFirst'] . ' ' . $line['nameLast'] . '</a></td> <td valign="top"><center>'. $line['height'] . '</center></td> <td valign="top"><center>'. $line['level'] . '</center></td> <td valign="top">'. $line['hschool'] . '</td> <td valign="top">'. $line['college'] . '</td> </tr>';}
  14. Lovemy, I appreciate your efforts, but none of those php settings apply to what I need and I can't make heads or tails of them. Certainly there has to be a way to take a normal hide/show script and place it within PHP.  I already have access to cookie and sessions.  In the code I provided, I'm able to determine which group the user is with.  From there I just need it to determine which layer to show and which layer to hide based on the group they're in. 
  15. What I have is at the top of the code.  It's recognizing the php and just printing the echo statement.  Here is how the js function is called, but I tried that earlier too. onmousedown MM_showHideLayers('ss2008','','show')
  16. Maybe I'm not explaining myself clearly enough.  The schedules aren't in a database.  They are just put in a table in a layer.  Right now all four layers are set to "hidden".  I just want the code to determine which group the user is in, and from that determine which layer to "show". Something like this: [code] if (in_array(9, $user_info['groups']))   { echo 'showHideLayers(\'ss2008\',\'\',\'show\')';   } [/code] Only it's not working.  Instead of executing the code it just prints:  showHideLayer('ss2008', ' ', 'show')';
  17. Ninja, Thanks for answering. I'm using SMF actually and already have registration, cookies, membergroups, and permissions set up.  I'm using their membergroup and permission structure across my site.  I can easily set up code to control which pages they get to or what information to see, EXCEPT hiding and showing layers based on what membergroup they are with. If they are with SS2008, I want them to see SS2008's schedule.  If they are with SS2011, I want them to see SS2011's schedule.  IS2008 and IS2011...the same thing.  I have four different schedules, each in their own layer.  I want PHP to read what group/team they are wish and display the appropriate schedule.
  18. I searched and didn't find anything near what I was looking for.  Here is my issue: It's a website that deals with four basketball teams.  Each team has its own schedule, and I'm making them register to view some parts of the site.  When they register they can choose which Membergroup/team they are with.  I would like for them each to see their team's schedule when they visit the home page. I have hide/show toggles with onMouseDown commands for me (to be able to see all four), but what I can't seem to get to work is a code the differentiates which team they are on and shows the proper schedule as they visit the home page.  I've tried php code in the style script, as well as separate onLoad commands.  Neither worked. Thoughts?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.