Fri, 22 Nov 2024
Total Visits
35382519
Visitors today:
1233
Main Menu
Home
Free Scripts
Forum
Guestbook
Repository
Contact
Our Sponsors
Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
Search
Hottest Topics
Member Listing
FAQ
Register
/
Login
modify Gender
Forum Index
»
Advanced Guestbook Modifications
Author
Message
10/03/2015 15:56:26
Subject:
modify Gender
admin2
Newbie
Joined: 03/03/2015 13:00:49
Messages: 3
Offline
I want to modify Gender
applied
Gender: Male , Male2 , Female , Female2 , Female3
modify code How do step
thankyou
11/03/2015 00:54:27
Subject:
modify Gender
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
It's easy but why so many?
Carbonize
I am not the maker of the Advanced Guestbook
get
Lazarus
11/03/2015 05:07:58
Subject:
Re:modify Gender
admin2
Newbie
Joined: 03/03/2015 13:00:49
Messages: 3
Offline
I'm not the expert,
but I'll try
11/03/2015 09:23:45
Subject:
modify Gender
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
1 - edit templates/form_gender.php to add the new inputs. Make sure they all have a value that is a single letter.
2 - Open lib/gb.class.php and find
if ($this->db->VARS["allow_gender"]==1) { $GENDER = ($row['gender']=="f") ? " <img src=\"$GB_PG[base_url]/img/female.gif\" width=\"12\" height=\"12\">" : " <img src=\"$GB_PG[base_url]/img/male.gif\" width=\"12\" height=\"12\">"; } else { $GENDER = ''; }
replace with
if ($this->db->VARS["allow_gender"]==1) { if ($row['gender'] == 'f') { $GENDER = " <img src=\"$GB_PG[base_url]/img/female.gif\" width=\"12\" height=\"12\">"; } elseif ($row['gender'] == 'm') { $GENDER = " <img src=\"$GB_PG[base_url]/img/male.gif\" width=\"12\" height=\"12\">"; } else { $GENDER = ''; } }
Adding more elseif to include the new options you added.
Carbonize
I am not the maker of the Advanced Guestbook
get
Lazarus
11/03/2015 12:35:35
Subject:
Re:modify Gender
admin2
Newbie
Joined: 03/03/2015 13:00:49
Messages: 3
Offline
thankyou Carbonize
Forum Index
»
Advanced Guestbook Modifications
Go to:
Select a forum
General Discussion
Support Forum
German Forum
Advanced Guestbook Forum
Advanced Guestbook Modifications
Based on the open source
JForum