MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
Moderators: mem paulo89 adminik
Page 1/2 1 2 >
RSSReply
image
AuthorText
putyn
Just arrived
Avatar

Posts: 9
Contributes: 0

Gender: _NEUTRAL_
Online: No
Date: 06/05/2008 20:55
image
#post6977
i need some help, i have notice that all the image form the portal are uploaded on site root, is there any chance to change that ?! and to use only links to image?
Edited: 06/05/2008 20:56
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 06/05/2008 21:07
Re: image
#post6978
sorry I don´t understand, can explain better?
Image
Delete Edit Quote
 
putyn
Just arrived
Avatar

Posts: 9
Contributes: 0

Gender: _NEUTRAL_
Online: No
Date: 07/05/2008 16:36
Re: image
#post6995
I don't want to upload all my image on my server(the image for gallery news user avatar articles...) i would like to be able to put only the link(from other server) Smile
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 08/05/2008 01:23
Re: image
#post7003
Hi

Are difficult to make these changes
Image
Delete Edit Quote
 
putyn
Just arrived
Avatar

Posts: 9
Contributes: 0

Gender: _NEUTRAL_
Online: No
Date: 08/05/2008 12:43
Re: image
#post7018
i know that is hard so i came here for help Smile, i really like the cms and i don't want to change it just for that!
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 08/05/2008 21:53
Re: image
#post7024
But why you want to do this? You don´t have space on your host? The changes would have to be so many that it was more easier create a new script ^^
Image
Delete Edit Quote
 
leoliet
Just arrived
Avatar

Posts: 1
Contributes: 0

Gender: _NEUTRAL_
Online: No
Date: 08/05/2008 23:29
Re: image
#post7025
i also have the same request

i don't want anyone to upload anything to my site

i have a forum site (SMF), and it's has more than 700 members
Every members have their own avatar
But it's not big deal because SMF has features that disable all files uploading (including avatar, attach) and allow users to show their avatar from other URL

I think this feature is very important for community based site
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 09/05/2008 00:39
Re: image
#post7033
Tomorrow I do an example, now I go to sleep, I am very tired
Image
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 09/05/2008 22:02
Re: image
#post7038
here is an example

file: pages/users/index.php

Find and replace function changeProfile

code

function changeProfile() {
        global $dblink,$siteConfig,$user;

        if (isset($_POST['chg'])) { $chg = inCode($_POST['chg']); } else { $chg = false; }
        if (isset($_POST['chg_email'])) { $chg_email = inCode($_POST['chg_email']); } else { $chg_email = ""; }
        if (isset($_POST['chg_sito'])) { $chg_sito = inCode($_POST['chg_sito']); } else { $chg_sito = ""; }
        if (isset($_POST['chg_icq'])) { $chg_icq = inCode($_POST['chg_icq']); } else { $chg_icq = ""; }
        if (isset($_POST['chg_msn'])) { $chg_msn = inCode($_POST['chg_msn']); } else { $chg_msn = ""; }
        if (isset($_POST['chg_aol'])) { $chg_aol = inCode($_POST['chg_aol']); } else { $chg_aol = ""; }
        if (isset($_POST['chg_yahoo'])) { $chg_yahoo = inCode($_POST['chg_yahoo']); } else { $chg_yahoo = ""; }
        if (isset($_POST['chg_notify_pvtmsg'])) { $chg_notify_pvtmsg = intval($_POST['chg_notify_pvtmsg']); } else { $chg_notify_pvtmsg = 0; }
        if (isset($_POST['chg_notify_forum'])) { $chg_notify_forum = intval($_POST['chg_notify_forum']); } else { $chg_notify_forum = 0; }
        if (isset($_POST['chg_avatar'])) { $chg_avatar = inCode($_POST['chg_avatar']); } else { $chg_avatar = ""; }
        if (isset($_POST['chg_gender'])) { $chg_gender = inCode($_POST['chg_gender']); } else { $chg_gender = ""; }
        if (isset($_POST['chg_signature'])) { $chg_signature = inCode($_POST['chg_signature']); } else { $chg_signature = ""; }
        if (isset($_POST['chg_pass0'])) { $chg_pass0 = inCode($_POST['chg_pass0']); } else { $chg_pass0 = ""; }
        if (isset($_POST['chg_pass'])) { $chg_pass = inCode($_POST['chg_pass']); } else { $chg_pass = ""; }
        if (isset($_POST['chg_pass2'])) { $chg_pass2 = inCode($_POST['chg_pass2']); } else { $chg_pass2 = ""; }
        $feedurl = (isset($_POST['feedurl'])) ? inCode($_POST['feedurl']) : "" ;

        if (!$chg) {
                if (isUser($user)) {
                        $row_info = $dblink->get_row("SELECT * FROM memht_utenti WHERE user='$user'");
                        $pass = $row_info['pass'];
                        $email = outCode($row_info['email']);
                        $sito = outCode($row_info['sito']);
                        $icq = outCode($row_info['icq']);
                        $msn = outCode($row_info['msn']);
                        $aol = outCode($row_info['aol']);
                        $yahoo = outCode($row_info['yahoo']);
                        $notify_pvtmsg = intval($row_info['notify_pvtmsg']);
                        $notify_forum = intval($row_info['notify_forum']);
                        $avatar = outCode($row_info['avatar']);
                        $gender = intval($row_info['gender']);
                        $signature = outCode($row_info['signature']);
                        $showsignature = censure(bb2html(outCode($row_info['signature'],0)));
                        $feedurl = outCode($row_info['feed']);

                        if (($avatar=="blank.png") OR ($avatar=="")) {
                        $check_avatar="";
                        $show_image="images/avatar/blank.png";
                        }else{
                        $check_avatar=$avatar;
                        $show_image=$avatar;
                        }

                        openTable(_MODIFYPROFILE_);
                        echo "<table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
                                echo "<form name='form' method='post' action='index.php?page=users&op=editProfile'>\n";
                                echo "<tr><th>"._USERNAME_.":</th><td><b>$user</b></td></tr>\n";
                                echo "<tr><th class='std_hlight'>"._EMAIL_.":</th><td class='std_hlight'><input type='text' name='chg_email' value="$email" size='30' maxlength='255'></td></tr>\n";
                                echo "<tr><th>"._SITE_.":</th><td><input type='text' name='chg_sito' value="$sito" size='30' maxlength='255'></td></tr>\n";
                                echo "<tr><th class='std_hlight'>"._ICQ_.":</th><td class='std_hlight'><input type='text' name='chg_icq' value="$icq" size='30' maxlength='255'></td></tr>\n";
                                echo "<tr><th>"._MSN_.":</th><td><input type='text' name='chg_msn' value="$msn" size='30' maxlength='255'></td></tr>\n";
                                echo "<tr><th class='std_hlight'>"._AOL_.":</th><td class='std_hlight'><input type='text' name='chg_aol' value="$aol" size='30' maxlength='255'></td></tr>\n";
                                echo "<tr><th>"._YAHOO_.":</th><td><input type='text' name='chg_yahoo' value="$yahoo" size='30' maxlength='255'></td></tr>\n";

                                echo "<tr><td class='std_hlight' nowrap><b>"._NOTIFICATION_."</b> ("._MESSAGES_.")<b>:</b><div class='info'>"._ALWAYS_."</div></td><td class='std_hlight'>";
                                        echo "<select name='chg_notify_pvtmsg'>";
                                                if ($notify_pvtmsg==1) {
                                                        echo "<option value='1' selected>"._YES_."</option>\n";
                                                        echo "<option value='0'>"._NO_."</option>\n";
                                                } else {
                                                        echo "<option value='1'>"._YES_."</option>\n";
                                                        echo "<option value='0' selected>"._NO_."</option>\n";
                                                }
                                        echo "</select>";
                                echo "</td></tr>\n";
                                echo "<tr><td nowrap><b>"._NOTIFICATION_."</b> ("._FORUM_.")<b>:</b><div class='info'>"._ALWAYS_."</div></td><td>";
                                        echo "<select name='chg_notify_forum'>";
                                                if ($notify_forum==1) {
                                                        echo "<option value='1' selected>"._YES_."</option>\n";
                                                        echo "<option value='0'>"._NO_."</option>\n";
                                                } else {
                                                        echo "<option value='1'>"._YES_."</option>\n";
                                                        echo "<option value='0' selected>"._NO_."</option>\n";
                                                }
                                        echo "</select>";
                                echo "</td></tr>\n";
                                echo "<tr><th class='std_hlight' valign='top'>"._AVATAR_.":</th><td class='std_hlight'><img name='chgavapro' src='$show_image' border='0' title='$user'>";
                                echo "<div style='padding:2px 0 0 0;'><input type='text' name='chg_avatar' value="$check_avatar" size='30' maxlength='255'></div>";
                                echo "</td></tr>\n";
                                echo "<tr><th>"._GENDER_.":</th><td>";
                                        echo "<select name='chg_gender'>\n";
                                                if ($gender==0) {
                                                        echo "<option value='0' selected>"._NEUTRAL_."</option>\n";
                                                        echo "<option value='1'>"._MALE_."</option>\n";
                                                        echo "<option value='2'>"._FEMALE_."</option>\n";
                                                } else if ($gender==1) {
                                                        echo "<option value='0'>"._NEUTRAL_."</option>\n";
                                                        echo "<option value='1' selected>"._MALE_."</option>\n";
                                                        echo "<option value='2'>"._FEMALE_."</option>\n";
                                                } else {
                                                        echo "<option value='0'>"._NEUTRAL_."</option>\n";
                                                        echo "<option value='1'>"._MALE_."</option>\n";
                                                        echo "<option value='2' selected>"._FEMALE_."</option>\n";
                                                }
                                        echo "</select>\n";
                                echo "</td></tr>\n";
                                echo "<tr><td class='std_hlight'><b>"._RSS_FEEDS_.":</b></td><td class='std_hlight'><select name='feedurl'>";
                                $result = $dblink->get_list("SELECT title,link FROM memht_rssreader_links ORDER BY title");
                                foreach ($result as $row) {
                                        $title = outCode($row['title']);
                                        $link = outCode($row['link']);

                                        $selected = ($feedurl==$link) ? " selected" : "" ;
                                        echo "<option value="$link"$selected>$title</option>\n";
                                }
                                echo "</select></td></tr>\n";
                                echo "<tr><td valign='top' colspan='2'><b>"._SIGNATURE_.":</b><br><br>";
                                if ($showsignature!="") { echo "<div class='box' style='overflow:auto;'>$showsignature</div><br>"; }
                                bbcodeToolbar("form","chg_signature","public");
                                echo "<br>";
                                textarea("chg_signature","100%","100px",0,"",$signature);
                                echo "</td></tr>\n";
                                echo "<tr><td colspan='2' class='small'>"._COMPILEONLYIFCHANGEPASS_.":</td></tr>\n";
                                echo "<tr><th class='std_hlight'>"._ACTUALPASSWORD_.":</th><td class='std_hlight'><input type='password' name='chg_pass0' size='20' maxlength='50'></td></tr>\n";
                                echo "<tr><th>"._PASSWORD_.":</th><td><input type='password' name='chg_pass' size='20' maxlength='50'></td></tr>\n";
                                echo "<tr><th class='std_hlight'>"._REPASSWORD_.":</th><td class='std_hlight'><input type='password' name='chg_pass2' size='20' maxlength='50'></td></tr>\n";
                                echo "<input type='hidden' name='chg' value='true'>";
                                echo "<tr><td colspan='2' align='center'><input type='submit' name='Submit' value='"._MODIFY_."'></td></tr>\n";
                                echo "</form>\n";
                        echo "</table>";
                closeTable();
                } else {
                        openTable();
                        echo "<div align='center' id='errorText'><b>"._ACCESSDENIED_."</b></div>";
                        closeTable();
                }
        } else {
                if (isUser($user)) {
                        $change = true;

                        if ($chg_sito!="" AND !validate($chg_sito,"^[http://]*[a-zA-Z0-9~._-]*.[a-zA-Z0-9~._-]*.[A-Za-z]{2,4}/?$")) { $change = false; $msg = "<b>"._FIELDINVALID_."</b>: "._SITE_; }
                        if ($chg_icq!="" AND !validate($chg_icq,"^[0-9]*$")) { $change = false; $msg = "<b>"._FIELDINVALID_."</b>: "._ICQ_; }
                        if ($chg_msn!="" AND !validEmail($chg_msn)) { $change = false; $msg = "<b>"._FIELDINVALID_."</b>: "._MSN_; }
                        if ($chg_aol!="" AND !validEmail($chg_aol)) { $change = false; $msg = "<b>"._FIELDINVALID_."</b>: "._AOL_; }
                        if ($chg_yahoo!="" AND !validEmail($chg_yahoo)) { $change = false; $msg = "<b>"._FIELDINVALID_."</b>: "._YAHOO_; }
                        if (!validEmail($chg_email)) { $change = false; $msg = _MAILNOTVALID_; }
                        $row_info = $dblink->get_row("SELECT pass FROM memht_utenti WHERE user='$user'");
                        $old_pass = $row_info['pass'];

                        if ($chg_pass!="" AND $chg_pass2!="") {
                                if (validPass($chg_pass) && md5($chg_pass0)==$old_pass && $chg_pass==$chg_pass2) {
                                        $passquery = ",pass='".md5($chg_pass)."'";
                                } else {
                                        $change = false;
                                        $msg = _PASSNOTVALID_;
                                }
                        } else { $passquery = ""; }

                        if ($change) {
                                $dblink->query("UPDATE memht_utenti SET email='$chg_email',sito='$chg_sito',icq='$chg_icq',msn='$chg_msn',aol='$chg_aol',yahoo='$chg_yahoo',avatar='$chg_avatar',gender='$chg_gender',signature='$chg_signature',feed='$feedurl',notify_pvtmsg='$chg_notify_pvtmsg',notify_forum='$chg_notify_forum'".$passquery." WHERE user='$user'");
                                echo "<meta http-equiv='refresh' content='0;URL=".$siteConfig['site_url']."/index.php?page=users'>";
                        } else {
                                openTable();
                                        echo "<div align='center' id='errorText'>$msg</div>";
                                closeTable();
                        }
                } else {
                        openTable();
                                echo "<div align='center' id='errorText'><b>"._ACCESSDENIED_."</b></div>";
                        closeTable();
                }
        }
}
 
Edited: 10/05/2008 14:16
Reason: Smiles Off
Image
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1042
Contributes: 241

Gender: _MALE_
Online: No
Date: 09/05/2008 22:04
Re: image
#post7039
you can add even more things, how to check if the URL is valid or not, etc.
Image
Delete Edit Quote
 
Reply
Page 1/2 1 2 >
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Search
Users Block
Hi Guest
IP: 38.103.63.60

Username
Password
New files
MemHT Wiki
Friends