PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Fri Apr 22, 2005 5:37 pm Reply with quote Back to top

heres what i did to get this to work Smile
now my forum profiles are gone and replaced with CNBYA Profiles ...YAY:)

EDIT: modules/forums/profile.php
FIND:

Code:
if ( $mode == 'viewprofile' )
{
include("includes/usercp_viewprofile.php");
exit;
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
exit;
}
include("includes/usercp_register.php");
exit;
}




REPLACE WITH:
in the first line that starts with header remove one ? from modules.php??
had to do that so this site will show it correctly

Code:
if ( $mode == 'viewprofile' )
{
$sql = "SELECT username FROM ".$prefix."_users WHERE user_id = $u";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$un = $row[username];
}
Header("Refresh: 0; url=modules.php??name=Your_Account&op=userinfo&username=$un");
}
else if ( $mode == 'editprofile' )
{
Header("Refresh: 0; url=modules.php?name=Your_Account&op=edituser");
}
View user's profile Send private message Send e-mail Visit poster's website
menelaos61
Worker
Worker


Joined: Nov 10, 2004
Posts: 110

PostPosted: Sun Apr 24, 2005 4:17 pm Reply with quote Back to top

Nice Smile
View user's profile Send private message Send e-mail
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Sun Apr 24, 2005 10:00 pm Reply with quote Back to top

thanks i was looking everywhere for somthing to do it then i started messing with it and came up with this ...short and sweet and does the job Razz
View user's profile Send private message Send e-mail Visit poster's website
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1140
Location: Manchester, NH USA

PostPosted: Wed Apr 27, 2005 10:16 am Reply with quote Back to top

Unfortunately, there is a downside relative to this relating to Signature managment and fields that don't yet exist in CNB_YA that do exist in Profile.

Presently, CNB_YA uses Profile functions to manage some signatures (something that really bothers me).

Over time, signature fixes have been worked out of nuke and into the profile function which is very problematic. In fact, you'll notice that CNB_YA relies on Profile exclusively for this function and if you are using dynamic or graphic signatures, you can forget about having CNB_YA handling it correctly, it must be done via profile.

Thus, you should keep that in mind.

I'm of the mind and heart to eliminate profile as well, but with the understanding that some functions really rely on Profile. Also, as CNB_YA has yet to incorporate ALL of the profile fields into CNB_YA, it may still be necessary for people ot have access to profile to fill in or to view that information.

In my case, I use GoogleTap, thus I was able to simply change the redirect rules there instead of having to modify core code to force YA for some functions, but I do leave profile available for others until these issues can be addressed in future CNB_YA versions.

Just a heads-up!
Steph
View user's profile Send private message Visit poster's website
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Wed Apr 27, 2005 5:35 pm Reply with quote Back to top

ya i noted that the signature dont work very well in cnbya for adding an image
but if you have no added fields in the forum profiles you could use this code to view CNB YA profiles and forums profile edit still works


FIND:
Code:
if ( $mode == 'viewprofile' )
{
include("includes/usercp_viewprofile.php");
exit;



REPLACE WITH:
in the first line that starts with header remove one ? from modules.php??
had to do that so this site will show it correctly
Code:
if ( $mode == 'viewprofile' )
{
$sql = "SELECT username FROM ".$prefix."_users WHERE user_id = $u";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$un = $row[username];
}
Header("Refresh: 0; url=modules.php??name=Your_Account&op=userinfo&username=$un");
View user's profile Send private message Send e-mail Visit poster's website
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Sun May 08, 2005 7:33 pm Reply with quote Back to top

hello, is there a way to replace CNBYA profile with forum profiles.
thanks
View user's profile Send private message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Sun May 08, 2005 10:34 pm Reply with quote Back to top

if you did the YA profile hack above make sure you remove it before doing this

EDIT: modules/Your_Account/public/userinfo.php

FIND:
Code:

$result  = $db->sql_query("SELECT * FROM ".$user_prefix."_users WHERE username='$username'");
$num     = $db->sql_numrows($result);
$usrinfo = $db->sql_fetchrow($result);


ADD THIS BELOW IT:
(remove 1 ? from modules.php??)
Code:

Header("Location: modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]");


Last edited by djdiz-e on Mon May 09, 2005 2:26 pm; edited 1 time in total
View user's profile Send private message Send e-mail Visit poster's website
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Mon May 09, 2005 10:05 am Reply with quote Back to top

i understood that i have to add
Code:

Header("Location: modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]");

after
Code:

$result  = $db->sql_query("SELECT * FROM ".$user_prefix."_users WHERE username='$username'");
$num     = $db->sql_numrows($result);
$usrinfo = $db->sql_fetchrow($result);

in public/userinfo.php file,but could not understand this line.
Code:

(remove 1 & from modules.php??)

can you explain it.
thanks.
View user's profile Send private message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Mon May 09, 2005 2:26 pm Reply with quote Back to top

sorry i mean remove 1 ? from that line Smile
so it will be modules.php?

if i post it as it should be this site will display it as

Header("Location: profile-.html$usrinfo[user_id]");

witch is incorrect
View user's profile Send private message Send e-mail Visit poster's website
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Mon May 09, 2005 6:25 pm Reply with quote Back to top

i did it but the following errors come.
Code:

Fatal error: Cannot redeclare replace_for_mod_rewrite() (previously declared in C:\Program Files\Apache Group\Apache2\htdocs\header.php:10) in C:\Program Files\Apache Group\Apache2\htdocs\header.php on line 10
View user's profile Send private message
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Mon May 09, 2005 7:04 pm Reply with quote Back to top

sorry the above problem was just because i was trying to make a forum hack.
it works well.
i have another question.
is it possible to replace all CNBya userinfo url with froum viewprofile url.i.e.
Code:

modules.php??name=Your_Account&op=userinfo&username=username

with corresponding forum url
Code:

modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]
View user's profile Send private message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Mon May 09, 2005 7:38 pm Reply with quote Back to top

it is but you have to edit every file that points to the YA profiles
so if you have a user info block that points to the YA profile u will need to edit the file block-User_Info.php in the blocks folder and change the line
modules.php??name=Your_Account&op=userinfo&username=??

..this way it makes it really easy to make it work Smile
View user's profile Send private message Send e-mail Visit poster's website
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Mon May 09, 2005 8:13 pm Reply with quote Back to top

now when i login ,after installing your hack, i am redirected to forums profile.is there a way so that when you login you are rediected CNBYA profile instead of forum profile.and when other user tries to view your profile then they are redirected to forum profile.
View user's profile Send private message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Mon May 09, 2005 9:48 pm Reply with quote Back to top

FIND:
Code:
$result  = $db->sql_query("SELECT * FROM ".$user_prefix."_users WHERE username='$username'");
$num     = $db->sql_numrows($result);
$usrinfo = $db->sql_fetchrow($result);


ADD THIS BELOW:
Code:

cookiedecode($user);
$check = $cookie[1];
if(!$usrinfo[username] == "$check") {
Header("Location: modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]");
}



IF YOU GOT THIS REPLACE IT WITH ABOVE CODE:
Code:
Header("Location: modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]");
View user's profile Send private message Send e-mail Visit poster's website
version
New Member
New Member


Joined: May 06, 2005
Posts: 8

PostPosted: Tue May 10, 2005 6:50 am Reply with quote Back to top

Going back to the original post, ive replaced the code and removed the extra'?' but now I get a std ie page saying 'this page cannot be displayed'.
When i hover my mouse over a members name in the forums the link still shows
Only registered users can see links on this board!
Get registered or login to the forums!


Im using 7.6 platinum if that helps
View user's profile Send private message
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Tue May 10, 2005 10:55 am Reply with quote Back to top

Code:

cookiedecode($user);
$check = $cookie[1];
if(!$usrinfo[username] == "$check") {
Header("Location: modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]");
}

this code was not working so i changed it to

Code:

cookiedecode($user);
$check = $cookie[1];
if($usrinfo[username] != "$check") {
Header("Location: modules.php??name=Forums&file=profile&mode=viewprofile&u=$usrinfo[user_id]");
}
View user's profile Send private message
version
New Member
New Member


Joined: May 06, 2005
Posts: 8

PostPosted: Tue May 10, 2005 10:59 am Reply with quote Back to top

version wrote:
Going back to the original post, ive replaced the code and removed the extra'?' but now I get a std ie page saying 'this page cannot be displayed'.
When i hover my mouse over a members name in the forums the link still shows
Only registered users can see links on this board!
Get registered or login to the forums!


Im using 7.6 platinum if that helps


Anyone
View user's profile Send private message
ashishjha54
Hangin' Around


Joined: Jan 24, 2005
Posts: 41

PostPosted: Tue May 10, 2005 11:10 am Reply with quote Back to top

do as per djdiz-e has instructed.he is a great programmer .i want to thank him for the trick he has given me.
Thank you djdiz-e.
can you tell me when i login into my account i get the following code for signature.is it possible that i get the original signature in place of this codein userinfo.
[img:0764663e7b]http://www.yahoo.com/images/sig/ash.gif[/img:0764663e7b][img:0764663e7b]http://www.yahoo.com/images/sig/ashleh.gif[/img:0764663e7b]
View user's profile Send private message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Tue May 10, 2005 11:20 am Reply with quote Back to top

where do you see 'this page cannot be displayed'?
is it when you click the username to see the user info?
View user's profile Send private message Send e-mail Visit poster's website
version
New Member
New Member


Joined: May 06, 2005
Posts: 8

PostPosted: Tue May 10, 2005 11:22 am Reply with quote Back to top

yes, exactly that.

Thanks for reply
View user's profile Send private message
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Tue May 10, 2005 11:26 am Reply with quote Back to top

[img:0764663e7b]?? is what YA puts there when you use the [IMG]???[/IMG] code in your signature in the edit forum profile,YA dosent seem to handle images in the signatures if you try to add them in the YA edit profile page ..not sure a way around it havent looked into it i think thats going to be fixed in the next version

maybe someone else has more info on this?
View user's profile Send private message Send e-mail Visit poster's website
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Tue May 10, 2005 11:27 am Reply with quote Back to top

can you post you web address for me to see?
or maybe pm it if you like
View user's profile Send private message Send e-mail Visit poster's website
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Wed May 11, 2005 5:47 pm Reply with quote Back to top

if the above dont work you might wanna try this:
FIND:
Code:
if ( $mode == 'viewprofile' )
{
include("includes/usercp_viewprofile.php");
exit;
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
exit;
}
include("includes/usercp_register.php");
exit;
}



REPLACE WITH THIS:
remove one ? mark from Header("Location: modules.php??
Code:
if ( $mode == 'viewprofile' ) {
$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));
$u = $profiledata['user_id'];
$sql = "SELECT username FROM ".$prefix."_users WHERE user_id = $u";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$un = $row[username];
}
Header("Location: modules.php??name=Your_Account&op=userinfo&username=$un");
exit;
}
else if ( $mode == 'editprofile' )
{
Header("Location: modules.php?name=Your_Account&op=edituser");
exit;
}
View user's profile Send private message Send e-mail Visit poster's website
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Thu Jun 09, 2005 7:17 pm Reply with quote Back to top

menelaos should add this YA Hack to the new version
maybe add a option to select profiles to use in the config for CNB YA
i can write up alittle script for it if you like Smile
View user's profile Send private message Send e-mail Visit poster's website
djdiz-e
Regular
Regular


Joined: Dec 19, 2004
Posts: 51
Location: Ontario, Canada

PostPosted: Fri Aug 26, 2005 6:10 pm Reply with quote Back to top

i also added a photo upload to the your account section

registration required to view photo
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2010 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum