Go Back   Pligg CMS Forum > Other > My Pligg Site

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2006, 09:30 PM
New Pligger
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ideas.meedio.com

Just wanted to say thanks for your excellent work. We have taken the idea and used it to allow our users to make and vote on feature requests for our products; it fits very well.

If you want to take a peek, head on over to http://ideas.meedio.com

Thanks!
Pablo Pissanetzky, CTO, Meedio, LLC.
Reply With Quote
  #2 (permalink)  
Old 01-15-2006, 05:36 PM
New Pligger
 
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Excellent adaptation of the script! Would you mine explaining how you went about integrating it with phpBB?
Reply With Quote
  #3 (permalink)  
Old 07-31-2006, 04:53 PM
New Pligger
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Here are the changes we used at meedio.com:

New File: libs/forum.php
PHP Code:
<?php

function forum_get_row$sql )
{

$forum_dbhost 'localhost';
$forum_dbname 'phpbb_db';
$forum_dbuser 'phpbb_user';
$forum_dbpasswd 'phpbb_password';

        
$forum_db = @ mysql_connect$forum_dbhost $forum_dbuser $forum_dbpasswd );

        if ( ! 
$forum_db )
                die( 
"Failed to connect to forum database" );

        if ( ! @ 
mysql_select_db$forum_dbname $forum_db ) )
                die( 
"Failed to select forum database" );

        
$result = @ mysql_query$sql $forum_db );

        if ( ! 
$result )
                die( 
"Failed to execute forum query" );

        return @ 
mysql_fetch_object$result );
}


function 
forum_get_user_name$user_id )
{
        
$user forum_get_row'select * from phpbb_users where user_id="'.$user_id.'"');

        return 
$user->username;
}
?>
Add the following line to libs/comment.php, libs/link.php, libs/login.php, libs/user.php

include_once( 'forum.php' );


in libs/comment.php change function username()

from:
$this->username = $db->get_var("SELECT user_login FROM users WHERE user_id = $this->author");
to:
$this->username = forum_get_user_name( $this->author );


in libs/link.php change function read()

from:
$this->username=$link->user_login;
to:
$this->username=forum_get_user_name($link->link_author);


Change libs/login.php function UserAuth()

from:
$dbuser=$db->get_row("SELECT user_id, user_pass, user_level FROM users WHERE user_login = '$dbusername'");
to:
$dbuser = forum_get_row( "SELECT user_id, user_password, user_level FROM phpbb_users WHERE username = '$dbusername'" );

Change libs/login.php function Authenticate()

from:
$user=$db->get_row("SELECT user_id, user_pass FROM users WHERE user_login = '$dbusername'");
to:
$user = forum_get_row( "SELECT user_id, user_password, user_level FROM phpbb_users WHERE username = '$dbusername'" );


Change libs/user.php function read()

to:
PHP Code:
        function read() {
                global 
$db$current_user;
                
$id $this->id;

                if(
$this->id>0$where "user_id = $id";
                else if(!empty(
$this->username)) $where "username='".$db->escape($this->username)."'";

                if(!empty(
$where) && ($user forum_get_row("SELECT * FROM phpbb_users WHERE $where"))) {
                        
$this->id =$user->user_id;
                        
$this->username $user->username;
                        
$this->level "normal";
                        
$date=$user->user_regdate;
                        
$this->date=$db->get_var("SELECT UNIX_TIMESTAMP('$date')");
                        
$date=$user->user_lastvisit;
                        
$this->modification=$db->get_var("SELECT UNIX_TIMESTAMP('$date')");
                        
$this->pass $user->user_password;
                        
$this->email $user->user_email;
                        
$this->names $user->username;
                        
$this->lang $user->user_lang;
                        
$this->karma 10;
                        
$this->public_email "";
                        
$this->url $user->user_website;
                        
$this->aim $user->user_aim;
                        
$this->msn $user->user_msnm;
                        
$this->yahoo $user->user_yim;
                        
$this->gtalk '';
                        
$this->skype '';
                        
$this->irc '';
                        
$this->read true;
                        return 
true;
                }
                
$this->read false;
                return 
false
        

Reply With Quote
  #4 (permalink)  
Old 07-31-2006, 10:42 PM
Div Div is offline
Casual Pligger
 
Join Date: May 2006
Posts: 60
Thanks: 0
Thanked 7 Times in 4 Posts
I'm no coder, but if I read this right, Pligg would be using the forum database for it's users. Is this correct? Would the forum have to be installed before the install of Pligg? Would the users be using Pligg registration or the forum registration? If I have Pligg installed already and then install the forum and patch, would the users from Pligg carry over to the forum?

I suppose I will find all this out when I install the forum and apply the patch, but it would be nice to know beforehand.

Thanks for the patch!!!
__________________
DivGamer.com
Reply With Quote
  #5 (permalink)  
Old 07-31-2006, 10:52 PM
New Pligger
 
Join Date: Mar 2006
Posts: 25
Thanks: 28
Thanked 1 Time in 1 Post
Quote:
Originally Posted by Div
I'm no coder, but if I read this right, Pligg would be using the forum database for it's users. Is this correct? Would the forum have to be installed before the install of Pligg? Would the users be using Pligg registration or the forum registration? If I have Pligg installed already and then install the forum and patch, would the users from Pligg carry over to the forum?

I suppose I will find all this out when I install the forum and apply the patch, but it would be nice to know beforehand.

Thanks for the patch!!!
Hey Div - Can u let us know when you get it to work please? and any info that we need to know (file additions and such). Thanks.
Reply With Quote
  #6 (permalink)  
Old 07-31-2006, 11:15 PM
Casual Pligger
 
Join Date: Jul 2006
Posts: 45
Thanks: 1
Thanked 1 Time in 1 Post
Excellent work! I love it when folks extend what they have to work with. Pligg is awesome as it stands, and again, thanks to everyone working on it, but especially love to see when people take the initiative to make it do so much more.

I just wish I had more to contribute to the project.
__________________
Thanks to everyone who is working on Pligg! It is simply amazing.


poliNEWS.org
Reply With Quote
  #7 (permalink)  
Old 08-01-2006, 01:54 AM
Div Div is offline
Casual Pligger
 
Join Date: May 2006
Posts: 60
Thanks: 0
Thanked 7 Times in 4 Posts
OK, I followed the patch beergeek posted and installed PHPbb and then did all the edits and new file. I can log into the forum, but I can't login to Pligg. Pligg seems to have lost all users including Me, the admin. And the logins in the forum aren't carrying over from the forum to pligg. It's late right now, I'll play some more tommorow and see if I did something wrong. Maybe I need to install the forum first? I don't know, too drowsy now, will keep you informed of progress.
__________________
DivGamer.com
Reply With Quote
  #8 (permalink)  
Old 08-01-2006, 09:09 PM
Div Div is offline
Casual Pligger
 
Join Date: May 2006
Posts: 60
Thanks: 0
Thanked 7 Times in 4 Posts
Well, I played with it some more today and can't seem to get it to work. I checked and re-checked everything to make sure I did it right. Some more info would be helpfull. Like which register and login to use and what is happening. Is it adding the users from PHPbb to pliggs users, or is it making pligg use PHPbb' user table.

I register in PHPbb fine, but that user cannot login to Pligg. Pligg's register and login no longer work. So is there something missing, or are the database tables supposed to have special names for both to use the same user table? Is there a special install sequence to follow?

Oh well. I tried.
__________________
DivGamer.com
Reply With Quote
  #9 (permalink)  
Old 08-04-2006, 08:25 AM
New Pligger
 
Join Date: Aug 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
This was a great example to give me ideas for invision integration. One thing this example didn't take into account (for those that implement it) are the who's voted and the admin functionality as it sets everyone to "normal". I have a test up for invision at http://www.bethegamer.com/pligg All the links in the skins haven't been updated yet, nor has the profile, but it's a solid start.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Search Engine Friendly URLs by vBSEO 3.2.0