Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account
Author Message
cajun
Hangin' Around



Joined: Apr 26, 2005
Posts: 28

PostPosted: Sat Apr 30, 2005 11:02 pm Reply with quote

I am trying to install NSN Groups with CNB Your Account. I need to mod the index.php file in modules/youraccout. That file is from CNB Your Account. I need to fine:

Code:
if ($my_headlines == 1 AND ($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {

    echo "<br>";
    OpenTable();
    echo "<center><b>"._MYHEADLINES."</b><br><br>"


in that file but do now see it.

I need to add this:

Code:
// Group Memberships

    // Add these to your Your_Account lang files:
    //define("_MEMBERGROUPS","Group Memberships");
    //define("_EXPIRES","expires");
    //define("_NOTSET","non-expiring");
    $result11 = $db->sql_query("SELECT gid, edate FROM ".$prefix."_nsngr_users WHERE uid='$userinfo[user_id]' ORDER BY gid");
    if (($db->sql_numrows($result11) > 0)) {
        if($userinfo[user_dateformat]=="") { $userinfo[user_dateformat] = grget_config(date_format); }
        echo "<br>";
        OpenTable();
        echo "<b>$userinfo[username]'s "._MEMBERGROUPS.":</b><br>\n";
        while(list($gid, $edate) = $db->sql_fetchrow($result11)) {
            list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_nsngr_groups WHERE gid='$gid'"));
            echo "<li>$gname";
            if (is_admin($admin)) { echo " ($gid)"; }
            if ($edate != "") {
                if ($edate != "0") {
                    echo "&nbsp;&nbsp;- <i>"._EXPIRES." ".date($userinfo[user_dateformat], $edate)."</i>";
                } else {
                    echo "&nbsp;&nbsp;- <i>"._NOTSET."</i>";
                }
            }
            echo "<br>\n";
        }
        CloseTable();
    }
    $db->sql_freeresult($result11);


Can someone that has both of these installed tell me how to do this.

Thanks
 
View user's profile Send private message
BobMarion
Former Admin in Good Standing



Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Sun May 01, 2005 12:10 am Reply with quote

Open modules/Your_Account/public/userinfo.php and find:
Code:
        CloseTable();


        $incsdir = dir("modules/$module_name/includes");


Place the NSN Groups code snipplet on the line between CloseTable(); and $incsdir = dir("modules/$module_name/includes");

So it will look like:
Code:
        CloseTable();

// Group Memberships
    // Add these to your Your_Account lang files:
    //define("_MEMBERGROUPS","Group Memberships");
    //define("_EXPIRES","expires");
    //define("_NOTSET","non-expiring");
    $result11 = $db->sql_query("SELECT gid, edate FROM ".$prefix."_nsngr_users WHERE uid='$userinfo[user_id]' ORDER BY gid");
    if (($db->sql_numrows($result11) > 0)) {
        if($userinfo[user_dateformat]=="") { $userinfo[user_dateformat] = grget_config(date_format); }
        echo "<br>";
        OpenTable();
        echo "<b>$userinfo[username]'s "._MEMBERGROUPS.":</b><br>\n";
        while(list($gid, $edate) = $db->sql_fetchrow($result11)) {
            list($gname) = $db->sql_fetchrow($db->sql_query("SELECT gname FROM ".$prefix."_nsngr_groups WHERE gid='$gid'"));
            echo "<li>$gname";
            if (is_admin($admin)) { echo " ($gid)"; }
            if ($edate != "") {
                if ($edate != "0") {
                    echo "&nbsp;&nbsp;- <i>"._EXPIRES." ".date($userinfo[user_dateformat], $edate)."</i>";
                } else {
                    echo "&nbsp;&nbsp;- <i>"._NOTSET."</i>";
                }
            }
            echo "<br>\n";
        }
        CloseTable();
    }
    $db->sql_freeresult($result11);
        $incsdir = dir("modules/$module_name/includes");


However the CNB Your Acocunt should place that in already since it is in hte modules/Your_Account/includes/ui-l10nsngr.php file.

_________________
Bob Marion
Codito Ergo Sum
http://www.nukescripts.net 
View user's profile Send private message Send e-mail Visit poster's website
sabastina
Hangin' Around



Joined: May 12, 2005
Posts: 37

PostPosted: Sat May 21, 2005 1:57 am Reply with quote

Thanks much Bob. I was trying to figure that out, then I remembered seeing this post here. I really appreciate the post here.

Sabastina
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> CNB Your Account

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©