Home Private Messages Search
CPG Dragonfly™ CMS Dedicated Server & Bandwidth Sponsored by DedicatedNOW
Toggle Content
 
Forums ⇒ CMS (All) ⇒ Requests :: Archives ⇒ Member Quick Link :: Archived


Member Quick Link :: Archived
Requests for core changes must be submitted through the Projects Features section.
Go to page 1, 2, 3  Next
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page     Forum Index ⇒  Requests

Topic Archived View previous topic :: View next topic  
Author Message
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Sun Aug 22, 2004 2:21 pm
Post subject: Member Quick Link

can we make it so that members of the site can access their profile through the simple link of www.yoursitename.com/username ???

it would be MUCH easier for members and non-members to promote the site...like, i see people who have profiles on other websites using links like above but on cpg it's something like www.yousitename.com/in...?=username

: )

can this be done?

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
Trevor
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 2170
Location: New York
PostPosted: Sun Aug 22, 2004 11:50 pm
Post subject: Re: Member Quick Link

It may interfere with other tasks though.

In this case, it may be best to do something like index.php?user=Cody


Trevor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.18 / 4.4.2 / CVS
Back to top
View user's profile Photo Gallery
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: Mon Aug 23, 2004 1:20 am
Post subject: Re: Member Quick Link

You can do that easily yourself with a .htaccess mod_rewrite
Code::
RewriteRule ^member/(.*) index.php?name=Your_Account&op=userinfo&username=$1


DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Mon Aug 23, 2004 1:12 pm
Post subject: Re: Member Quick Link

you mean by adding that to the root htaccess file, it will let users into their profile/account by typing yoursite.com/username

? : )

i'll have to try it ...!

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Tue Aug 24, 2004 4:28 pm
Post subject: Re: Member Quick Link

that doesn't work?

unless i did it wrong

what do i need to do?

so users can click on yoursitename.com/username

to pull up their info?

thanks!

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Tue Aug 24, 2004 8:06 pm
Post subject: Re: Member Quick Link

any word on this either?

i tried the htaccess thing, unless i goofed it up?

would be a great feature for the site : )

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
Trevor
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 2170
Location: New York
PostPosted: Tue Aug 24, 2004 8:20 pm
Post subject: Re: Member Quick Link

Well, if you don't want to use .htaccess, you could add it to index.php

Open up index.php

Find:
PHP:
global $userinfo;

Replace with:
PHP:
global $mainindex, $userinfo;


Find:
PHP:
        } else {
$message = _MODULENOTACTIVE;
nuke_error($message, "");
}
}
}

Replace with:
PHP:
        } else {
$message = _MODULENOTACTIVE;
nuke_error($message, "");
}
}
} elseif (isset(
$_GET['user'])) {
$userLookup = $_GET['user'];
if (!
ereg("^([a-zA-Z0-9_\-]+)$", $userLookup)) { die("You're so cool!"); }
header("Location: ".getlink("Your_Account&op=userinfo&username=$userLookup")."");
}


Trevor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.18 / 4.4.2 / CVS
Back to top
View user's profile Photo Gallery
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Wed Aug 25, 2004 1:03 pm
Post subject: Re: Member Quick Link

nope that didn't work either.... : (

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
Trevor
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 2170
Location: New York
PostPosted: Wed Aug 25, 2004 1:53 pm
Post subject: Re: Member Quick Link

Will check on this. I'm having a bit of FTP trouble at the moment, but I should have a working version within an hour or so


Trevor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.18 / 4.4.2 / CVS
Back to top
View user's profile Photo Gallery
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Wed Aug 25, 2004 4:03 pm
Post subject: Re: Member Quick Link

ok rock on ; )

this would be the coolest thing =)

and/or even create a module where users can have their own webpage, like, their profile page but with more stuff...yeah no? : )

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
Trevor
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 2170
Location: New York
PostPosted: Wed Aug 25, 2004 4:06 pm
Post subject: Re: Member Quick Link

masterbeta wrote:
and/or even create a module where users can have their own webpage, like, their profile page but with more stuff...yeah no? : )

Yeah, that would be associated with the My Account module. We've received loads of requests for this, so it just may show up in future releases Wink


Trevor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.18 / 4.4.2 / CVS
Back to top
View user's profile Photo Gallery
Trevor
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 2170
Location: New York
PostPosted: Wed Aug 25, 2004 7:04 pm
Post subject: Re: Member Quick Link

Replace contents of index.php with:

PHP:
<?php
/*********************************************
CPG-NUKE: Advanced Content Management System
********************************************
A highly modified version of PHP-Nuke 6.5
which is Copyright (c) 2002 by Francisco Burzi
phpnuke.org

Under the GNU General Public License version 2

Last modification notes:

$Id: index.php,v 1.2 2004/06/25 21:09:20 teckart Exp $

*************************************************************/
require_once("mainfile.php");
$PHP_SELF = "modules.php";
$_SERVER['PHP_SELF'] = "modules.php";

if (!isset(
$file)) { $file="index"; }
else if (
ereg("\.\.",$file)) {
die(
"You are so cool...");
}

if (
defined('OSC_INSTALLED') && is_user($user)) { run_osc_start(); }

global
$userinfo;

if (isset(
$name)) {
// modules.php
$module = 1;
if (
ereg("\.\.",$name)) {
die(
"You are so cool...");
}
$name = trim($name);
// Fix_Quotes($name, 1);

if ($name == "Credits") {
$index = 0;
include(
"header.php");
OpenTable();
echo
'<h2 align="center">Credits</h2>';
CloseTable();
echo
"<br />";
OpenTable();
echo
'<table border=0 width="100%">';
echo
'<tr><td><font size="+1"><b>Mod</b></font></td><td><font size="+1"><b>Description</b></font></td><td><font size="+1"><b>Author(s)</b></font></td></tr>';
echo
'<tr><td colspan=4><hr /></td></tr>';
echo
'<tr><td valign="top">CPG-Nuke '.$Version_Num.'</td><td>'.$copyright.'</td><td valign="top"><a href="http://www.cpgnuke.com" target="_new">Akamu &amp; DJMaze</a></td></tr>';
$result = $db->sql_query("SELECT * FROM ".$prefix."_credits ORDER BY modname");
while(
$row = $db->sql_fetchrow($result)) {
echo
'<tr><td colspan=4><hr /></td></tr>';
echo
"<tr><td valign=\"top\">$row[modname]</td><td valign=\"top\">$row[description]</td><td valign=\"top\"><a href=\"http://$row[url]\" target=\"_new\">$row[author]</a></td></tr>";
}
echo
'</table>';
CloseTable();
include(
"footer.php");
exit;
} else if (
$name == "smilies") {
include(
"includes/nbbcode.php");
echo
smilies_table("window", $field, $form);
exit;
} else if (
$name == "Privacy_Policy") {
$index = 0;
include(
"header.php");
OpenTable();
echo
'<h2 align="center">Privacy Policy</h2>';
if (
is_admin($admin)) {
echo
'<a href="'.adminlink('UsersConfig').'">Modify this message</a>';
}
CloseTable();
echo
"<br />";
OpenTable();
list(
$privacy) = $db->sql_fetchrow($db->sql_query("SELECT registermsg FROM ".$prefix."_users_config"));
echo
$privacy;
CloseTable();
include(
"footer.php");
exit;
}
$modpath = "modules/$name/$file.php";
if (!
file_exists($modpath)) {
die(
"Sorry, such file doesn't exist...");
}
if (
is_admin($admin)) {
include(
$modpath);
} else {
$sql = "SELECT active, view FROM ".$prefix."_modules WHERE title='$name'";
$result = $db->sql_query($sql);
list(
$mod_active, $view) = $db->sql_fetchrow($result);
if (
$mod_active) {
$ThemeSel = get_theme();
if (
$view == 0) {
include(
$modpath);
}
else if (
$view == 1) {
if (
is_user($user)) {
include(
$modpath);
} else {
// don't show register link unless allowuserreg is yes
$allowur = $db->sql_fetchrow($db->sql_query("SELECT allowuserreg FROM ".$prefix."_users_config"));
$message = "<b>"._RESTRICTEDAREA."</b><br /><br />"._MODULEUSERS.(($allowur['allowuserreg']) ? _MODULEUSERS2 : "" ) ;
nuke_error($message, _ACCESSDENIED);
}
} elseif (
$view == 2) {
$message = "<b>"._RESTRICTEDAREA."</b><br /><br />"._MODULESADMINS;
nuke_error($message, _ACCESSDENIED);
}
// VIEW == USERGROUPS
elseif ($view > 2) {
if (
$userinfo['_mem_of_groups'][($view-2)]) {
include(
$modpath);
} else {
list($groupName) = $db->sql_fetchrow($db->sql_query("select group_name from ".$prefix."_bbgroups where group_id=".($view-2)));
$message = "<b>"._RESTRICTEDAREA."</b><br /><br />$groupName group access required";
nuke_error($message, _ACCESSDENIED);
}
}
} else {
$message = _MODULENOTACTIVE;
nuke_error($message, "");
}
}
} elseif (isset(
$_GET['user'])) {
$userLookup = $_GET['user'];
if (!
ereg("^([a-zA-Z0-9_\-]+)$", $userLookup)) { die("You're so cool!"); }
header("Location: ".getlink("Your_Account&op=userinfo&username=$userLookup")."");
} else {
// index.php
$name = $main_module;
$home = 1;
if (
$httpref && isset($_SERVER["HTTP_REFERER"])) {
$referer = check_html($_SERVER['HTTP_REFERER'], 'nohtml');
if (
$referer!="" && !eregi("^unknown", $referer) && substr("$referer",0,strlen($nukeurl))!=$nukeurl && !eregi("^bookmark",$referer)) {
$result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '$referer')");
}
$numrows = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_referer"));
if(
$numrows[0] >= $httprefmax) {
$result = $db->sql_query("DELETE FROM ".$prefix."_referer");
}
}
$ThemeSel = get_theme();
$modpath = "modules/$name/$file.php";
if (
file_exists($modpath)) {
require(
$modpath);
} else {
$message = (is_admin($admin)) ? '<b>'._HOMEPROBLEM.'</b><br /><br />[ <a href="'.adminlink('modules').'">'._ADDAHOME.'</a> ]' : _HOMEPROBLEMUSER;
nuke_error($message, "");
}
}
?>


See it in action by heading to index.php?user=Phillip, obviousely inputting the username of your choice


Trevor's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux / 1.3.34 / 4.1.18 / 4.4.2 / CVS
Back to top
View user's profile Photo Gallery
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Wed Aug 25, 2004 8:54 pm
Post subject: Re: Member Quick Link

yeah but i'd want a yoursite.com/username

: )

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
DJ Maze
Developer
Developer

Offline Offline
Joined: Apr 19, 2004
Posts: 5683
Location: http://tinyurl.com/5z8dmv
PostPosted: Wed Aug 25, 2004 9:43 pm
Post subject: Re: Member Quick Link

Code::
<limit GET PUT POST>
order allow,deny
allow from all
</limit>

# deny most common except .php
<filesmatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module|exe)$">
deny from all
</filesmatch>

#Disable .htaccess viewing from browser
<files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</files>

<files ~ "\config.php$">
deny from all
</files>

RewriteEngine On
RewriteRule /index.html /index.php
RewriteRule ^member/(.*) index.php?name=Your_Account&op=userinfo&username=$1

# You can change to yoursite.com
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404

Options -Indexes

_________________
There are two paths, the short one and the long one.
When you choose the short path you will notice it takes longer then the long path.
So READ the FAQ and Wiki first Razz

DJ Maze's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Fedora 15 / 2.2.22 / 5.5.20 / 5.3.10 / CVS
Back to top
View user's profile Visit poster's website Yahoo Messenger Photo Gallery
masterbeta
Translator
Translator

Offline Offline
Joined: May 12, 2004
Posts: 1049
Location: Reading, PA
PostPosted: Wed Aug 25, 2004 10:19 pm
Post subject: Re: Member Quick Link

is that if i change the index.php page like above?

i didn't change the index page, but i added the code into htaccess

with no luck : (

_________________
[]D [] []\/[] []D
Check out my bear site - www.insidebear.com

masterbeta's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
RHL7 2.6.9-67.0.15ELsmp/A1.3.41(Unix)/MySQL4.1.22-standard/PHP5.2.5-ZO/Dragonfly 9.1.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page    Forum Index ⇒  Requests
Page 1 of 3
All times are GMT
Go to page 1, 2, 3  Next

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy