Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Building a Bridge for gallery app, help please
vrijvlinder
MVP
I am trying to build a bridge for a coppermine gallery app, I want to be able to use the gallery logged into vanilla etc..
The app I am using does not have a bridge for vanilla specifically but one can hack other ones like phpbb.
I have modified an existing phpbb , I am missing some info I am not sure is correct with regards to setting up the cookie prefix . I did not post all of it, the rest is just table stuff. I just need to know if this is the correct setting to bridge coppermine app with vanilla. In the admin for the app it asks for cookie name but that is confusing when there are so many cookies involved...
Thanks !
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...'); if (isset($bridge_lookup)) { $default_bridge_data[$bridge_lookup] = array( 'full_name' => 'Vanilla version 2.0.18.4', 'short_name' => 'Vanilla', 'support_url' => 'http://www.vanilla.org/', 'full_forum_url_default' => 'http://www.mydatabass.com/Forum', 'full_forum_url_used' => 'http://www.mydatabass.com', 'relative_path_to_config_file_default' => '../Forum/', 'relative_path_to_config_file_used' => 'lookfor,config.php', 'use_post_based_groups_default' => '0', 'use_post_based_groups_used' => 'radio,1,0', 'cookie_prefix_default' => 'SALT', 'cookie_prefix_used' => 'cookie', ); } else { // Switch that allows overriding the bridge manager with hard-coded values define('USE_BRIDGEMGR', 1); require_once 'bridge/udb_base.inc.php'; class cpg_udb extends core_udb { function cpg_udb() { global $BRIDGE; if (!USE_BRIDGEMGR) { $this->boardurl = 'http://www.mydatabass.com/Forum'; require_once('../conf/config.php'); } else { $this->boardurl = $BRIDGE['full_forum_url']; require_once($BRIDGE['relative_path_to_config_file'] . 'conf/config.php'); $this->use_post_based_groups = $BRIDGE['use_post_based_groups']; } $this->multigroups = 1; // Database connection settings $this->db = array( 'name' => $dbname, 'host' => $dbhost ? $dbhost : 'localhost', 'user' => $dbuser, 'password' => $dbpasswd, 'prefix' =>$table_prefix ); // Board table names $this->table = array( 'users' => 'users', 'groups' => 'groups', 'sessions' => 'sessions', 'usergroups' => 'user_group' ); // Derived full table names $this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users']; $this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups']; $this->sessionstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions']; $this->usergroupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['usergroups']; // Table field names $this->field = array( 'username' => 'username', // name of 'username' field in users table 'user_id' => 'user_id', // name of 'id' field in users table 'password' => 'user_password', // name of 'password' field in users table 'email' => 'user_email', // name of 'email' field in users table 'regdate' => 'user_regdate', // name of 'registered' field in users table 'active' => 'user_active', // is user account active? 'lastvisit' => 'user_lastvisit', // name of 'location' field in users table 'location' => 'user_from', // name of 'location' field in users table 'website' => 'user_website', // name of 'website' field in users table 'usertbl_group_id' => 'group_id', // name of 'group id' field in users table 'grouptbl_group_id' => 'group_id', // name of 'group id' field in groups table 'grouptbl_group_name' => 'group_name' // name of 'group name' field in groups table ); // Pages to redirect to $this->page = array( 'register' => '/ucp.php?mode=register', 'editusers' => '/memberlist.php', 'edituserprofile' => "/memberlist.php?mode=viewprofile&u=", ); // Group ids - admin and guest only. $this->admingroups = array(2); $this->guestgroup = 3; // Use a special function to collect groups for cpg groups table $this->group_overrride = 1; // Cookie settings - used in following functions only $this->cookie_name = $BRIDGE['cookie_prefix']; // Connect to db $this->connect(); } function collect_groups() { $sql ="SELECT * FROM {$this->groupstable} WHERE group_single_user = 0"; $result = cpg_db_query($sql, $this->link_id); $udb_groups = array(102 =>'Administrators', 2=> 'Registered', 3=>'Guests'); while ($row = mysql_fetch_assoc($result)) { $udb_groups[$row[$this->field['grouptbl_group_id']]+100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']])); } return $udb_groups; } // definition of how to extract id, name, group from a session cookie function session_extraction() { $superCage = Inspekt::makeSuperCage(); //if (isset($_COOKIE[$this->cookie_name . '_sid'])) { // $session_id = addslashes($_COOKIE[$this->cookie_name . '_sid']); if ($superCage->cookie->keyExists($this->cookie_name . '_sid')) { $session_id = $superCage->cookie->getEscaped($this->cookie_name . '_sid'); $sql = "SELECT u.{$this->field['user_id']} AS user_id, u.{$this->field['password']} AS password FROM {$this->usertable} AS u, {$this->sessionstable} AS s WHERE u.{$this->field['user_id']}=s.session_user_id AND s.session_id = '$session_id' AND u.user_id > 0"; $result = cpg_db_query($sql, $this->link_id); if (mysql_num_rows($result)){ $row = mysql_fetch_array($result); return $row; } else { return false; } } }
Tagged:
3
Comments
perhaps @todd or @lincoln could assist you
There was an error rendering this rich post.
That would be greatly appreciated !! ♥♥♥♥
here is a link to the documentation for the app about bridging
http://documentation.coppermine-gallery.net/en/bridging.htm#integrating_cookie_start
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I may be wrong, but the cookie that Vanilla sets by default is called "Vanilla".
My shop | About Me
I can help you with the cookie. I'll get you the info tomorrow.
thanks you guys, but I am still trying to figure it out. I tried using Vanilla as the cookie name but something did not go right. the cookie for phpbb is phpbb3mysql or something like that, I also have a numerical cookie for Salt and the domain cookie .
if I can't get the name of the cookie can I at least get some milk please ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Was this bridge ever completed/figured out? I've been messing around with galleries, and Coppermine seems the easiest and most attractive for me to customize to replicate my forums. I'd just like to have them bridged for SSO -- I already have WordPress and Vanilla connected for SSO. I checked the Coppermine forums, and there still hasn't been a user submitted bridge for Vanilla created.
no, sadly the best I could come up with was the Galleries plugin , and peregrine made the My Attachments plugin.
I did like coppermine gallery but was not able to make it integrate successfully.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Does this ever come?
I would pay for it so bad...
Its an musthave for my website, a gallery for designs..
money talks, and specific amounts of pledges talk even louder, to separate the wheat from the chaff.
e.g. Someone said they badly wanted something and would pay me to develop.something that would have required 40 hours of work). When i asked how much it was worth to them for me to do - and they said they were willing to pay $5 for it , since they were a student.
OTOH - lets say someone wrote sphinx plugin or yaga or some other great app or plugin that involved alot of hours (much more than the number of hours to develop a premium theme), and lots of people voluntarily donated (even though the air was free). That developer might have been more willing to take something on that they put alot of time into, since they were rewarded before (even though there was no requirement to be rewarded). Get my gist.
start with the amount you will pledge for it, and maybe someone will also wish to pledge, and then if a developer sees a reasonable pledge amounts they might take it on. Usually this helps get the process started, at least form what I've seen.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I'll do 50euros dunno how much it is in dollars to get coppermine workin with vanilla (login to coppermine with vanilla userinformation).
Well , try the Galleries plugin ...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I have successfully managed to connect Piwigo to my vanilla forum userbase in the past.
I have attached the user.inc.php, which is a drop-in replacement for the user.inc.php in the /includes folder of Piwigo that forces your Vanilla session and user ID in piwigo.
A few things to make this work:
1: You need the > VanillaIdentity.php < in your root (or change line 28 in the attached file accordingly) and configure it.
2: For users to actually be able to upload images, you need to install the community plugin (as Piwigo is not a multi-user gallery by default)
3: Piwigo and Vanilla need to use the same database as they will share a user table!
add this to your piwigo configuration file to map the fields:
A few other config values that might prove helpful:
Set them according to the IDs in your vanilla install.
4: Enable the "Personal Plugin" which ships with piwigo and lets you add plugin code through the ACP. These are a few modifications I made to improve the integration between the systems, just paste them into your personal plugin:
5: pick a theme and integrate it to look like your forum/website
There a quite a few, I recommend the "elegant" theme
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
perhaps @x00 @bleistivt @hgtonight @r_j or some of the other developers might be interested.
one pledge by Schryvers for 50 euros. maybe others are interested in pledging.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
No thanks, I wouldn't have the nerves to support something like that
But if he doesn't mind if it's not coppermine, he can try what I posted , but I won't be able to help much more, because I have removed the gallery from my site a few months ago as it added no value for my community.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
I cross-posted before I saw your post. just wanted to let you know in case you were interested.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Looks similar to the coppermine bridge. I suspect they work the same way. Coppermine is a pretty cool app because it allows editing and such. They offer bridges to many other apps. I am no longer using it because the Galleries plugin is sufficient for the purpose. But I can see how for art and photography it could be very useful.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I do wish people wouldn't use the word "bridge" It is kind of like unicorns: mythical.
There are a number of different things the people mean when they say "bridge", each of them different, ironically not of them are to do with the technical term "bridge pattern".
grep is your friend.
Neither pledging nor developing
I have a client in the works that wants this type of functionality. If she actually takes my bid, I will look into coppermine.
Actually, I just did. I don't think I will ever use that. Probably easier to write your own simple gallery application on top of Garden.
Count me out.
EDIT - I will still pledge $10 to anyone that does create this bridge.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
still pledge 50eu