Re: CPG 1.4 and SMF 1.1beta1 (bridge) - Page 2 Re: CPG 1.4 and SMF 1.1beta1 (bridge) - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Re: CPG 1.4 and SMF 1.1beta1 (bridge)

Started by donnoman, April 19, 2005, 02:29:58 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joachim Müller

Quote from: donnoman on April 21, 2005, 03:34:37 AM
If you replace that code with :


        // Derived full table names
        if (strpos($db_prefix, '.') === false) {
            $this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
            $this->groupstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
        } else {
            $this->usertable = $this->db['prefix'] . $this->table['users'];
            $this->groupstable = $this->db['prefix'] . $this->table['groups'];
        }


It will work for both 1.0.3 and 1.1 beta 1.

Should I commit this to devel?
There are for certain many smf1.0 installs around, so I recommend you create a new bridge file smf11.inc.php (unless you can handle both ways with one brige file).

Joachim

Nibbler

That code should handle it both ways - that's certainly the intention. I'd be happy for you to commit that change to the smf bridge. Only make a whole new file if there are really significant changes in 1.1

nukeworker

Quote from: donnoman on April 21, 2005, 04:40:47 AM
@nukeworker the reason the 1.3 bridge wasn't affected is those values are hardcoded in Coppemine's bridge. In 1.4 we rely on $db_prefix from smf's own SSI.php.

Your other "bridged" applications may be doing the same thing, and have an identical problem in that they are adding the dbname to the prefix twice.

Thank you for the insight.

aravot

Quote from: donnoman on April 21, 2005, 03:34:37 AM
If you replace that code with :


        // Derived full table names
        if (strpos($db_prefix, '.') === false) {
            $this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
            $this->groupstable =  '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
        } else {
            $this->usertable = $this->db['prefix'] . $this->table['users'];
            $this->groupstable = $this->db['prefix'] . $this->table['groups'];
        }


It will work for both 1.0.3 and 1.1 beta 1.

Should I commit this to devel?

Tried the above code with SMF 1.1 beta 1, it worked (did not test with SMF 1.0.x)

http://www.peterosipof.com/smf

test/test

donnoman

@gaugau that this the only change thats required for 1.1 as far as my testing went. I tested the latter code that I suggested with both my 1.03 install and the 1.1 beta 1, and it worked well.


Joachim Müller

[moderation]
bumping this unresolved thread to the top...

Case closed?

aravot

Quote from: GauGau on July 31, 2005, 12:22:08 PM
Case closed?

No case not closed, CPG 1.4.1 beta doesn't work with SMF 1.1 beta 3 public, however if you read the following posts I managed to bridge both however SMF user group doesn't show up in CPG configuration nore the users.

http://forum.coppermine-gallery.net/index.php?topic=19771.msg90792

http://www.simplemachines.org/community/index.php?topic=41996.0

donnoman

Aarovot, can you look at your bridge manager settings and see if "use post groups" = yes?

If not, set it to yes and try again. 

It's also entirely possible that SMF has changed thier code since I did the original fix.

aravot

Was my post removed? The follow up to 'donnoman' question.

Joachim Müller

we lost approx. 20 posts during the forum move. Apparently, yours was one of them, sorry. Please repost.

aravot

I see what I can recall.

Tested with
SMF 1.1 beta 3 public and CVS version of 20050728
CPG 1.4.1 beta CVS version of 20050728

Directory structure:
mysite.com/
----------- SMF
----------- CPG

Scenario 1
In Bridge manager if ["Use Post-based groups" = NO] than SMF groups and users don't get ported to CPG but the bridge works that is when in CPG clicking Login it redirects to SMF login.

Scenario 2
In Bridge manager if ["Use Post-based groups" = YES] than SMF groups and users DO Get ported to CPG.


Suggestion I know CPG 1.4.1 is on feature freeze but it would be nice to have login / logout redirection option

Example:
Logout Redirection : Back to <forum> page

donnoman

Can you post a test user account and password, and the url to your bridged gallery?

aravot

#32
edited: <link removed>

While at it please check Coppermine site with FireFox it looks weird I don't know if it is caused by bridge or what

Another thing I found out under 'Groups' if 'Public albums upload' is set to No than there is no upload button.

donnoman, I have PM-ed you Admin privileges if you want to test things out.

donnoman

it looks "wierd" in IE as well. Your CSS is messed up, and I noticed a few standard images are missing as well. I would suggest re-uploading Coppermine.

What exactly is the problem? It seemed to be acting "as designed" to me.

If you are in coppermine and "logout" then you will be on the Coppermine page and not be logged in. Thats the way it has always worked for me.

You said manipulating the "use" groups affected whether the groups were synced. Thats by design for the SMF bridge. It is my understanding that in the SMF bridge it's all groups or no groups.  It's worked this way with all of the SMF's I've setup.

I'm not seeing a problem that requires intervention yet.

aravot

Quote from: donnoman on August 06, 2005, 05:08:27 AM
it looks "wierd" in IE as well. Your CSS is messed up, and I noticed a few standard images are missing as well. I would suggest re-uploading Coppermine.

Fixed by re-uploading cpg

Quote
You said manipulating the "use" groups affected whether the groups were synced. Thats by design for the SMF bridge. It is my understanding that in the SMF bridge it's all groups or no groups.  It's worked this way with all of the SMF's I've setup.

If it is by design than it is working as desired, however I assumed selecting ["Use Post-based groups" = NO] than the none post-based groups would be ported to CPG.

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwebpages.charter.net%2Fosipof%2Fcpg%2Fcpgpostbased.gif&hash=148f79a7d121cff3ad5c503b024cabce316e6ad5)


Nibbler

It's explained in the documentation:

Use post-based groups?
Should Coppermine import the special groups that exist in the forum ? If you select no, then Coppermine will use the standard groups (Administrator, Registered and Anonymous) which makes administration easier and is recommended. You can change this setting later as well.

aravot

Just to clarify; here is where I got confused.

I have never used another forum so don't know about the rest but in SMF can create other Regular none post based groups, example below is how I use it in my board.

In addition to the regular groups (Administrator, Registered and Anonymous) I have few other none post-based groups (see pic), don't care about post based groups.

AC Students = This section can be viewed only by (ex)-students of the college
Charter Members = Paid membership access to the whole forum
CPG Members = All members in forum have disc space of 3MB to upload pictures however CPG members (paid membership) have 10MB of disc space
Gender M = Topics available only to Male
Gender F = Topic available only to Female
Inactive = Members who have not been active for 90 days are put in this group and have no privileges
None AC = These group is consist of those members who have not attended this particular college

So you see I thought by selecting ["Use Post-based groups" = NO], all these groups will port to CPG, this was my confusion, however maybe they need to be ported since they are not post base groups, anyway Keep up the Good Work.

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwebpages.charter.net%2Fosipof%2Fcpg%2Fsmf_groups.gif&hash=31849ee191b8bc70778414501dffed1c49ee1549)

Elegant John

#37
Guys;

Not to sound redundant here but I am having much of the same problems with the SMF bridge.

Using SMF 1.1B3
Using CPG 1.4

I upgraded smf10.php with GauGaus latest fix and that enabled the CPG to import the Groups list (setting =YES for post based groups)

The problem however is when I click on "USERS" in CPG, I get a "fatal error" ( screenshot below)

I might add, that when using 1.3.3 CPG, I was never able to get the bridge to work correctly causing my members to have to log in twice to the forum and the Gallery.

One last thing I should mention. I use a text link on the front page of the forum to direct members to login. Now, this will take me to an SMF login screen and when you enter the info, it directs you to the SMF front page. Not CPG. Same thing occurs if you try to login from within Coppermine.

I appreciate the help and guidance here guys. This is a heluuva product!

QuoteUSER:
------------------
Array
(
    [ID] => 75e21cf3d0e7ff310c8217ed8a38672b
    [am] => 1
    [lang] => english
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => pcorn54
    [groups] => Array
        (
           
  • => 101
            )

        [disk_max] => 0
        [disk_min] => 0
        [can_rate_pictures] => 0
        [can_send_ecards] => 0
        [ufc_max] => 3
        [ufc_min] => 3
        [custom_user_upload] => 0
        [num_file_upload] => 5
        [num_URI_upload] => 3
        [can_post_comments] => 0
        [can_upload_pictures] => 0
        [can_create_albums] => 0
        [has_admin_access] => 1
        [pub_upl_need_approval] => 1
        [priv_upl_need_approval] => 1
        [group_name] => Administrator
        [upload_form_config] => 3
        [group_quota] => 0
        [can_see_all_albums] => 1
        [group_id] => 101
    )

    ==========================
    Queries:
    ------------------
    Array
    (
       
  • => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
        [1] => select * from cpg_plugins order by priority asc; (0s)
        [2] => SELECT * FROM cpg_bridge (0s)
        [3] => SELECT u.ID_MEMBER AS id, u.memberName AS username, u.passwd AS password, u.ID_POST_GROUP+100 AS group_id FROM `fronter_smf2`.smf_members AS u INNER JOIN `fronter_smf2`.smf_membergroups AS g ON u.ID_POST_GROUP=g.ID_GROUP WHERE u.ID_MEMBER='1' (0s)
        [4] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg_usergroups WHERE group_id in (101) (0s)
        [5] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 101 (0s)
        [6] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 1 (0s)
        [7] => DELETE FROM cpg_banned WHERE expiry < '2005-08-12 14:15:16' (0s)
        [8] => SELECT * FROM cpg_banned WHERE (ip_addr='12.184.65.24' OR ip_addr='12.184.65.24' OR user_id=1) AND brute_force=0 (0s)
        [9] => DELETE FROM cpg_users WHERE user_name = '' LIMIT 1 (0.233s)
        [10] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
        [11] => SELECT count(*) FROM `fronter_smf2`.smf_members WHERE 1 (0.086s)
    )

    ==========================
    GET :
    ------------------
    Array
    (
        [sermgr_php] =>
    )

    ==========================
    POST :
    ------------------
    Array
    (
    )

    ==========================
    VERSION INFO :
    ------------------
    PHP version: 4.3.11 - OK
    ------------------
    mySQL version: 4.0.25-standard
    ------------------
    Coppermine version: 1.4.1(beta)
    ==========================
    Module: GD
    ------------------
    GD Version: bundled (2.0.28 compatible)
    FreeType Support: 1
    FreeType Linkage: with freetype
    T1Lib Support:
    GIF Read Support: 1
    GIF Create Support: 1
    JPG Support: 1
    PNG Support: 1
    WBMP Support: 1
    XBM Support: 1
    JIS-mapped Japanese Font Support:

    ==========================
    Module: mysql
    ------------------
    MySQL Supportenabled
    Active Persistent Links 1
    Active Links 2
    Client API version 3.23.49
    MYSQL_MODULE_TYPE builtin
    MYSQL_SOCKET /var/tmp/mysql.sock
    MYSQL_INCLUDE no value
    MYSQL_LIBS no value
    ==========================
    Module: zlib
    ------------------
    ZLib Support enabled
    Compiled Version 1.1.4
    Linked Version 1.1.4
    ==========================
    Server restrictions (safe mode)?
    ------------------
    Directive | Local Value | Master Value
    safe_mode | Off | Off
    safe_mode_exec_dir | no value | no value
    safe_mode_gid | Off | Off
    safe_mode_include_dir | no value | no value
    safe_mode_exec_dir | no value | no value
    sql.safe_mode | Off | Off
    disable_functions | no value | no value
    file_uploads | On | On
    include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
    open_basedir | no value | no value
    ==========================
    email
    ------------------
    Directive | Local Value | Master Value
    sendmail_from | no value | no value
    sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
    SMTP | localhost | localhost
    smtp_port | 25 | 25
    ==========================
    Size and Time
    ------------------
    Directive | Local Value | Master Value
    max_execution_time | 30 | 30
    max_input_time | -1 | -1
    upload_max_filesize | 2M | 2M
    post_max_size | 55M | 55M
    ==========================
    Page generated in 0.721 seconds - 12 queries in 0.319 seconds - Album set : ; Meta set: ;

snork13

Quote from: Elegant John on August 12, 2005, 09:54:41 PM
Guys;

One last thing I should mention. I use a text link on the front page of the forum to direct members to login. Now, this will take me to an SMF login screen and when you enter the info, it directs you to the SMF front page. Not CPG. Same thing occurs if you try to login from within Coppermine.




this is normal, the forum handle the login, and should redirect to the gallery once logged in.

i have the bridge working with 1.3x and 1.05 and 1.4x beta and smf1.1. b3

-snork

Nibbler

Right, can you change that line in udb_core from

$result = cpg_db_query("SELECT count(*) FROM {$this->usertable} WHERE 1");

to

$result = cpg_db_query("SELECT count(*) FROM {$this->usertable} WHERE 1", $this->link_id);

and see if that fixes it.