|
20070417 1635 CST Post Testimonials directly. Added the mod to allow testimonials to be posted directly to profile without approval. Like Myspace. Members can still delete testimonials. edit modules/testimonials.php and replace the "function add_testimonial()" with this code:
function add_testimonial(){
$info = auth_member();
$values = form_handle_input("write_testimonial"); $write_access = auth_testimonial_write_access($info["mem_id"],$values["per_id"]);
if(!$write_access){ build_error(16,$values["err_page"],$values["err_section"]); }//if
$sql_query="INSERT INTO testimonials (mem_id,per_id,feedback,date) VALUES (:0:,:1:,':2:',:3:)";
$GLOBALS["DB"]->values = array ($values["per_id"],$info["mem_id"], $values["feedback"],time());
$GLOBALS["DB"]->execute($sql_query);
$link = build_link("profile",$values["per_id"])."/?cmp_id=2"; load_page($link);
}//add_testimonial
Original filed backed up in directory
20070416 1300 CST Allow embeded media in profile.
This will change the "My Media" section in the profile questions to allow users to input embeded information like from youtube or google. One caution with this is since the "My Media" is in the column by default the width is generally only about 225 px wide. Default videos from Youtube.com are about 450 px wide. So if the user does not change the size then it will mess up the way their profile looks. So you may want to adjust your profile by putting the media section in the larger column. But it is up to you.
There are 3 steps to this modification:
FIRST You need to modify your database profile table. Which means you need to access it via phpmyadmin or similar. And you need to edit the "profile" table and change the "media" field type from "VarChar" to "Text" and remove the 255 string limitation.
NEXT 1. Go to admin->customize->profile sections and edit the profile with your media field (the default profile is personal). 2. Edit the "Add Sound or Video" field. 3. Change the "Field Type" to "text box" and enter the sizes. A good size is 8cols x 30 rows, but you can use whatever size you want. 4. Do not check "add to advanced search" 5. Update values
THEN
edit functions/build_functions.php under build_info function after case: "media" around line 580:
find: $ret = "<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer1">
Add directly above add: if (strstr(strtolower($values[$name]),"<object") || strstr(strtolower($values[$name]),"<embed")){ $ret = html_entity_decode($values[$name]); break;
Files backed up in directory
20070416 2010 CST Change number of pics in Hot or Not Random
This will increase (or decrease) the number of random photos that are displayed in the hotornot (rating) photo section.
edit modules/hotornot.php find under "random_selection()" function around line 142:
$sql_query = "SELECT pho_id,photos.mem_id,photos.photo_small,photos.posted FROM photos,profiles WHERE photos.mem_id=profiles.mem_id AND voting='1' ".$add." AND photos.mem_id!=".$info["mem_id"]." ORDER BY RAND() LIMIT 0,5";
Change: LIMIT 0,5
To: LIMIT 0,10
10 = the limit you would like to set for random photos
|