Author Topic: Using event.php?events_id=4 instead of event4.php  (Read 7837 times)

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Using event.php?events_id=4 instead of event4.php
« on: November 29, 2007, 07:59:52 PM »
Hello Guru's :)

I added a new table (4images_events) to my galery and also the events.php file.
At moment I am using it on some custom page, but I do not like it any more because everytime I have to make a new php file for every new event.

I want to use something like www.mysite.com/event.php?events_id=4 instead of www.mysite.com/event4.php

Can you give me please an idea how to do that. I will try it myself.

NOTE: I spent more than 5 hours to see how it works details.php and categery.php, but no luck yet :x

Many thanks in advance,
Cruxy

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #1 on: November 29, 2007, 08:07:09 PM »
Quote
NOTE: I spent more than 5 hours to see how it works details.php and categery.php, but no luck yet

See member.php file for $HTTP_GET_VARS and $HTTP_POST_VARS . Is big result. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #2 on: November 29, 2007, 08:33:12 PM »
Hey Thunderstrike. I can not believe it! I get it to work! Thank you very much for your support :D

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #3 on: November 29, 2007, 09:06:56 PM »
Hi, the first step is done.
Now I need to use the events_hits.

I added the column events_hits (int (10)) to the database and this code to the events.php (before Clickstream ):
Code: [Select]
// Update Events Hits
  $sql = "UPDATE ".EVENTS_TABLE."
          SET events_hits = events_hits + 1
          WHERE events_id = '$events_id'";
  $site_db->query($sql);
 

and this line to functions.php:
Code: [Select]
"events_hits" => $events_row['events_hits'],

and the line to events.html:
Code: [Select]
HITS: {events_hits}
It does not want to work yet!!
Can you see what I need more or what I did wrong?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #4 on: November 29, 2007, 09:25:34 PM »
I just checked the database and I find that the table is updated. I will try now to show it on the events.html.
I will let you know if does not work!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #5 on: November 29, 2007, 09:26:20 PM »
Quote
I will let you know if does not work!

If so, please remember step 6 of my signature.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #6 on: November 29, 2007, 09:54:53 PM »
Oke I give up! I can not show the {events_hits} value on the events.html. :x
All what I did you find it in the first post.
Can anyone help?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #7 on: November 29, 2007, 10:00:44 PM »
Quote
All what I did you find it in the first post.

Ok so is no problem.  :)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #8 on: November 29, 2007, 10:03:20 PM »
I can not show YET the value of {events_hits} on events.html/php.

Can you help :(

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #9 on: November 29, 2007, 10:11:32 PM »
Quote
Can you help Sad

No.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: Using event.php?events_id=4 instead of event4.php
« Reply #10 on: November 30, 2007, 09:49:30 AM »
Thank you anyway 8)