Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3   Go Down

Author Topic: Re: CPG 1.4 and SMF 1.1beta1 (bridge)  (Read 28772 times)

0 Members and 1 Guest are viewing this topic.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #20 on: April 21, 2005, 08:57:35 am »

If you replace that code with :

Code: [Select]
        // 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
Logged

Nibbler

  • Guest
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #21 on: April 21, 2005, 02:37:00 pm »

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
Logged

nukeworker

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 83
  • Visit NukeWorker.com
    • Nuclear Jobs
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #22 on: April 21, 2005, 08:55:55 pm »

@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

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #23 on: April 21, 2005, 09:04:02 pm »

If you replace that code with :

Code: [Select]
        // 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
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #24 on: April 22, 2005, 03:53:02 am »

@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.

Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #25 on: July 31, 2005, 12:22:08 pm »

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

Case closed?
Logged

aravot

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #26 on: July 31, 2005, 09:17:38 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
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #27 on: August 02, 2005, 03:23:02 am »

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.
Logged

aravot

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #28 on: August 04, 2005, 09:09:19 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #29 on: August 04, 2005, 10:23:35 pm »

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

aravot

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #30 on: August 04, 2005, 11:48:33 pm »

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
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #31 on: August 05, 2005, 03:48:17 am »

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

aravot

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #32 on: August 05, 2005, 05:42:21 am »

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.
« Last Edit: May 10, 2006, 08:36:08 pm by aravot »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #33 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.

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.
Logged

aravot

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #34 on: August 07, 2005, 08:17:03 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.

(http://webpages.charter.net/osipof/cpg/cpgpostbased.gif)

Logged

Nibbler

  • Guest
Re: Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #35 on: August 07, 2005, 03:30:27 pm »

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.
Logged

aravot

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 73
    • Product Compare for Virtuemart Shopping Cart
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #36 on: August 07, 2005, 06:43:33 pm »

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.

(http://webpages.charter.net/osipof/cpg/smf_groups.gif)
Logged

Elegant John

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #37 on: August 12, 2005, 09:54:41 pm »

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!

Quote
USER:
------------------
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: ;
« Last Edit: August 12, 2005, 10:33:39 pm by Elegant John »
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #38 on: August 12, 2005, 10:23:33 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
Logged

Nibbler

  • Guest
Re: Re: CPG 1.4 and SMF 1.1beta1 (bridge)
« Reply #39 on: August 12, 2005, 10:30:42 pm »

Right, can you change that line in udb_core from

Code: [Select]
$result = cpg_db_query("SELECT count(*) FROM {$this->usertable} WHERE 1");
to

Code: [Select]
$result = cpg_db_query("SELECT count(*) FROM {$this->usertable} WHERE 1", $this->link_id);
and see if that fixes it.
Logged
Pages: 1 [2] 3   Go Up
 

Page created in 0.027 seconds with 19 queries.