Witam. Chcia?em przerobi? skrypt "imie" na pare innych skryptów.
Plik user_gadu.php
<?php
$locale['uf_gadu'] = "Gadu gadu";
$locale['uf_gadu_desc'] = "Wy?wietla numer gadu gadu.";
?>
Kliknij i zaczekaj na załadowanie kodu ...
Plik user_gadu_include.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: user_location_include.php
| Author: Digitanium
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
if ($profile_method == "input") {
echo "<tr>\n";
echo "<td class='tbl'>".$locale['uf_gadu'].":</td>\n";
echo "<td class='tbl'><input type='text' name='user_gadu' value='".(isset($user_data['user_gadu']) ? $user_data['user_gadu'] : "")."' maxlength='150' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>\n";
} elseif ($profile_method == "display") {
if ($user_data['user_gadu']) {
echo "<tr>\n";
echo "<td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['uf_gadu']."</td>\n";
echo "<td align='right' class='tbl1'>".$user_data['user_gadu']."</td>\n";
echo "</tr>\n";
}
} elseif ($profile_method == "validate_insert") {
$db_fields .= ", user_gadu";
$db_values .= ", '".(isset($_POST['user_gadu']) && isnum($_POST['user_gadu']) ? $_POST['user_gadu'] : "")."'";
} elseif ($profile_method == "validate_update") {
$db_values .= ", user_gadu='".(isset($_POST['user_gadu']) && isnum($_POST['user_gadu']) ? $_POST['user_gadu] : "")."'";
}
?>Kliknij i zaczekaj na załadowanie kodu ...
Plik user_gadu_include_var.php
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: user_location_include_var.php
| Author: Digitanium
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
$user_field_name = $locale['uf_gadu'];
$user_field_desc = $locale['uf_gadu_desc'];
$user_field_dbname = "user_gadu";
$user_field_group = 2;
$user_field_dbinfo = "VARCHAR(50) NOT NULL DEFAULT ''";
?>
Kliknij i zaczekaj na załadowanie kodu ...
Wi?c w ka?dym skrypcie zamieni?em s?owo imie na gadu. Nazwy plików równie?. Wi?c teoretycznie powinno dzia?a?. W panelu administratora w zak?adce pola profilu wy?wietla si? opcja w??czenia Gadu gadu lecz jak j? w??czam to si? nie w??cza. Prosz? o pomoc co zrobi?, aby si? w??cza?a. Chc? jeszcze zrobi? taki skrypt tylko ?eby wy?wietla? numer telefonu komórkowego. Ale jaj b?d? wiedzia? co zrobi?, aby to dzia?a?o to zrobi? reszt?. Po prostu zmieniam nazwy tych plików i skrypty aby dwa pliki nie kolidowa?y ze sob?. np: user_imie i user_imie. Tylko user_gadu (wy?wietla numer gady) i user_tel (wy?wietla numer telefonu).
Wiadomo?? doklejona:
Ju? sobie poradzi?em. Wystarczy?o w pliku user_gadu_include_var usun?? na samy dole linijke
$user_field_dbinfo = "VARCHAR(50) NOT NULL DEFAULT ''";
Kliknij i zaczekaj na załadowanie kodu ...
Edytowane przez miriwol dnia 29.11.2008 15:27:09
|