Advanced search  

News:

cpg1.5.36 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.34 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Album Manager not working in Coppermine  (Read 649 times)

0 Members and 1 Guest are viewing this topic.

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Album Manager not working in Coppermine
« on: May 25, 2015, 02:12:01 PM »

Hi! All, I have integrated Coppermine with MyBB. But Album Manager not working as expected. All buttons are not working in Album Manager. looks like buttons are frozen.I tried to upload images as a registered user and as an admin, but I couldn't. Also I switched between the themes to find a solution, but It's not working. I have saw previous threads that mentioned this thing happens because of jQuery problem (I'm not a coder  :-[). Please help me to solve this.

Gallery url: rclanka.com/gallery/


Test Account login here: rclanka.com/gallery/login.php?referer=index.php
   Username: test
   Password: testsite

thanks.
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #1 on: May 25, 2015, 02:17:37 PM »

and I'm using Coppermine 1.5.36 version
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #2 on: May 25, 2015, 03:36:44 PM »

Where did you added this and what you need it for:

Code: [Select]
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="http://rclanka.com/jscripts/general.js?ver=1800"></script>

Your album manager is not working with any theme. Not even water_drop: http://rclanka.com/gallery/albmgr.php?theme=water_drop
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #3 on: May 25, 2015, 04:03:23 PM »

Hi! allvip, Thanks for helping. I have fixed the problem. I just remove the {JAVASCRIPT} from theme templates and It works like charm. But I don't know that how this affect other features.  ;)
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #4 on: May 25, 2015, 04:26:29 PM »

I don't think that's the answer.
Under {JAVASCRIPT} from theme template.html you should add:

Code: [Select]
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="http://rclanka.com/jscripts/general.js?ver=1800"></script>

That jquery scripts works if added after {JAVASCRIPT}.

Is this code in template.html?
Code: [Select]
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.plugins.min.js?ver=1800"></script>
<script type="text/javascript" src="http://rclanka.com/jscripts/general.js?ver=1800"></script>
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #5 on: May 25, 2015, 04:53:04 PM »

no, I don't see it in them's templates.html. But I can see those scripts in "View Page Source"  via Firefox. I have used MyBB Wrapper. But I don't know about coding.
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #6 on: May 26, 2015, 02:15:46 PM »

I have used MyBB Wrapper.

You used cpg_mybb_wrapper plugin http://www.communityplugins.com/forum/mydownloads.php?action=view_down&did=4

About {JAVASCRIPT} http://documentation.coppermine-gallery.net/en/theme_template.htm#theme_template_javascript

http://documentation.coppermine-gallery.net/en/theme_template.htm#theme_template_important

Be careful not to delete the {JAVASCRIPT}-token - this javascript is necessary for the full-size pop-ups and other functions related to JavaScript. If you remove it, you probably won't notice the difference in the first place, but you definitely mustn't remove it or your gallery will act up.

The problem you have is:
_coppermine loads on the pages jquery-1.3.2.js from the js folder of your coppermine.
_your MyBB Wrapper loads on the pages jQuery v1.11.2 from your_MyBB_folder/jscripts/jquery.js). You can see it with  in "View Page Source"  via Firefox:

Code: [Select]
<script type="text/javascript" src="http://rclanka.com/jscripts/jquery.js?ver=1800"></script>
That creats a jquery conflict (only one jquery version can load on a page) and is no need for two jquery versions to run on the same page anyway. One is enough for all the jquery plugins that load on the page.

DELETE jquery-1.3.2.js from gallery/js folder. Your jQuery v1.11.2 that is load it on every page by MyBB Wrapper will run all coppermine jquery scripts from gallery/js folder.
« Last Edit: May 26, 2015, 08:34:14 PM by allvip »
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #7 on: May 27, 2015, 02:37:09 AM »

Thanks for your help allvip. I have removed jquery-1.3.2.js from gallery/js folder and added {JAVASCRIPT} to the template. But again I can't create albums in album manager. Same as before. Any help?  :)
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #8 on: May 27, 2015, 12:22:40 PM »

1)What version of MyBB you have?
2)Can you tell me the code you have in gallery/cpg_mybb_wrapper.php section:

Code: [Select]
/***********************************************************
Start User Edit (2 of 2)
***********************************************************/

$headerinclude .= '<link rel="stylesheet" href="themes/classic/style.css" type="text/css" />';

/***********************************************************
End User Edit
***********************************************************/


3) Where you added it the code from Step 7: http://www.communityplugins.com/forum/showthread.php?tid=15
4) Can you paste the code from themes/water_drop/template.html?
« Last Edit: May 27, 2015, 12:40:26 PM by allvip »
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #9 on: May 27, 2015, 12:50:15 PM »

FOR GREG

I'm trying to test cpg_mybb_wrapper plugin, but I am not expert in php.
I have to append:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
{JAVASCRIPT}
</head>
<body>

to:

Code: [Select]
$headerinclude .= '<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />';

How to I do it? Can you give me the code?

Is this OK?

Code: [Select]
$headerinclude .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$headerinclude .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">';
$headerinclude .= '<head>';
$headerinclude .= '<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />';
$headerinclude .= '<meta http-equiv="Pragma" content="no-cache" />';
$headerinclude .= '<title>{TITLE}</title>';
$headerinclude .= '{META}';
$headerinclude .= '<link rel="stylesheet" href="css/coppermine.css" type="text/css" />';
$headerinclude .= '<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />';
$headerinclude .= '<link rel="shortcut icon" href="favicon.ico" />';
$headerinclude .= '{JAVASCRIPT}';
$headerinclude .= '<head>';
$headerinclude .= '<body>';
« Last Edit: May 27, 2015, 12:58:04 PM by allvip »
Logged

gmc

  • Dev Team member
  • Coppermine frequent poster
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 458
    • GMC Design Photo Gallery
Re: Album Manager not working in Coppermine
« Reply #10 on: May 27, 2015, 01:34:40 PM »

I'm not familiar with the CPG MYBB Wrapper - nor do I have a test environment with MYBB...

Multiple ways to do the assignment - what you have is valid.
(individual assignments per line - single assignment in quotes - single assignment with heredoc syntax)
change the last
Code: [Select]
$headerinclude .= '<head>'; to
Code: [Select]
$headerinclude .= '</head>';  - just a typo from copying I'm sure...

Greg
Logged
Thanks!
Greg

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #11 on: May 27, 2015, 03:48:07 PM »

Hi! Thank you all guys for you great support.
I'm intergrated by following this instructions: http://community.mybb.com/thread-87200.html

(1) MyBB wrapper.php code in my site

Code: [Select]
<?php
//ver 1.1
//PavementSucks.com

global $BRIDGE$globalcookie$globalpost$globalget$mybb$db$plugins$lang$groupscache$error_handler$theme$templates$cache$navigation$adserver_header_banner$adserver_header_leaderboard$adserver_skyscraper_top$adserver_footer,$cpg_main_top,$cpg_main_bottom;

$_COOKIE $globalcookie;
$_POST $globalpost;
$_GET $globalget;

/***********************************************************
Start User Edit (1 of 2)
***********************************************************/

define('MYBB_ROOT''/actual/root/deleted/as/requested');

/***********************************************************
End User Edit
***********************************************************/


define('IN_MYBB'1);
define('IN_CPG'1);
require(
$BRIDGE['relative_path_to_config_file'] . 'config.php');

$current_dir getcwd();

// set the path to your forums directory here (without trailing slash)
$forumdir MYBB_ROOT;

//change working directory to allow board includes to work
$forumdirslash $forumdir."/";
$change_dir "./";

if(!@
chdir($forumdir) && !empty($forumdir))
{
if(@is_dir($forumdir))
{
$change_dir $forumdir;
}
else
{
die("\$forumdir is invalid!");
}
}

require_once 
MYBB_ROOT."global.php";
require_once 
MYBB_ROOT."inc/functions.php";

//change directory back to current where script is
@chdir($current_dir);

$theme['imgdir'] = $forumdirslash.substr($theme['imgdir'],0);
$theme['imglangdir'] = $forumdirslash.substr($theme['imglangdir'],0);

//init time
$dateline time();

/* URL Definitions */
if($mybb->settings['seourls'] == "yes" || ($mybb->settings['seourls'] == "auto" && $_SERVER['SEO_SUPPORT'] == 1))
{
define('CPG_URL'"index.php");
}
else
{
define('CPG_URL'"index.php");
}

/***********************************************************
Start User Edit (2 of 2)
***********************************************************/

$headerinclude .= '<link rel="stylesheet" href="themes/classic/style.css" type="text/css" />';


/***********************************************************
End User Edit
***********************************************************/

eval("\$cpg_main_top = \"".$templates->get("cpg_main_top")."\";");
eval(
"\$cpg_main_bottom = \"".$templates->get("cpg_main_bottom")."\";");

global 
$navbits;

//since mybb parse page does not work in this case, replicate important parts and rebuild vars from others files.

// Add our main parts to the navigation
$navbits = array();
$navbits[0]['name'] = $mybb->settings['bbname_orig'];
$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";

//add initial breadcrumb
add_breadcrumb('Pics/Video'CPG_URL);

// Set the link to the archive.
$archive_url $mybb->settings['bburl']."/archive/index.php";

$cpg_main_top str_replace('<navigation>'build_breadcrumb(1), $cpg_main_top);
$cpg_main_bottom str_replace('<archive_url>'$archive_url$cpg_main_bottom);

$cpg_main_top str_replace("<html""<html xmlns=\"http://www.w3.org/1999/xhtml\""$cpg_main_top); 

if(
$lang->settings['rtl'] == 1)
{
$cpg_main_top str_replace("<html""<html dir=\"rtl\""$cpg_main_top);
}
if(
$lang->settings['htmllang'])
{
$cpg_main_top str_replace("<html""<html xml:lang=\"".$lang->settings['htmllang']."\" lang=\"".$lang->settings['htmllang']."\""$cpg_main_top);
}


?>


(2) I'm using water drop theme

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />

<!--
  SVN version info:
  Coppermine version: 1.5.9
  $HeadURL: https://svn.code.sf.net/p/coppermine/code/trunk/cpg1.5.x/themes/water_drop/template.html $
  $Revision: 7809 $
-->
</head>
<body>
  {CUSTOM_HEADER}
  <table width="100%" border="0" cellpadding="20" cellspacing="20">
    <tr>
      <td valign="top" style="border: 1px solid #CCD7E0; background-color: #F8F8F8;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%" align="center">
              {SYS_MENU}{SUB_MENU}
            </td>
          </tr>
        </table>
        <img src="images/spacer.gif" width="1" height="15" alt="" />
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td valign="top">
              {MESSAGE_BLOCK}
              {GALLERY}
               {CREDITS}
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  {CUSTOM_FOOTER}
</body>
</html>

(3) I'm using MyBB 1.8 in my forum. Thanks.
« Last Edit: May 27, 2015, 05:01:57 PM by gmc »
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #12 on: May 27, 2015, 04:23:26 PM »

Hi! gmc I have sent an emergency pm for you. Please take a look. Also allvip Can you please send me a messege or email. I need your help immediately. I have made mistake in forum. my email. vipularcl@gmail.com thanks.
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #13 on: May 27, 2015, 05:46:29 PM »

Thanks for solve that issue for me.  :)
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #14 on: May 27, 2015, 11:30:04 PM »

Multiple ways to do the assignment - what you have is valid.

Greg

Thanks A LOT.
« Last Edit: Yesterday at 12:58:57 AM by allvip »
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #15 on: May 27, 2015, 11:55:21 PM »

I have made mistake in forum.

What mistakes?

Anyway, here is the SOLUTION:

1) Go to forum Admin CP - Templates & Style - Templates - Search/Replace - scroll down to Search Template Titles - Search For - type in the box cpg_main_top - click Find Templates - click Options - click Full Edit - DELETE from the code:

Code: [Select]
<title>{$mybb->settings['bbname']}</title>

2) Open gallery/cpg_mybb_wrapper.php.

Find:

Code: [Select]
/***********************************************************
Start User Edit (2 of 2)
***********************************************************/

$headerinclude .= '<link rel="stylesheet" href="themes/classic/style.css" type="text/css" />';


/***********************************************************
End User Edit
***********************************************************/

Replace with:

Code: [Select]
/***********************************************************
Start User Edit (2 of 2)
***********************************************************/

$headerinclude .= '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">';
$headerinclude .= '<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />';
$headerinclude .= '<meta http-equiv="Pragma" content="no-cache" />';
$headerinclude .= '<title>{TITLE}</title>';
$headerinclude .= '{META}';
$headerinclude .= '<link rel="stylesheet" href="css/coppermine.css" type="text/css" />';
$headerinclude .= '<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />';
$headerinclude .= '<link rel="shortcut icon" href="favicon.ico" />';
$headerinclude .= '{JAVASCRIPT}';

/***********************************************************
End User Edit
***********************************************************/

3) Open gallery/themes/water_drop/template.html and delete:

Code: [Select]
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="{LANG_DIR}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>{TITLE}</title>
{META}
<link rel="stylesheet" href="css/coppermine.css" type="text/css" />
<link rel="stylesheet" href="themes/water_drop/style.css" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />

and:

Code: [Select]
</head>
<body>

and:

Code: [Select]
</body>
</html>

4) Go to gallery/js folder and delete jquery-1.3.2.js
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1054
Re: Album Manager not working in Coppermine
« Reply #16 on: Yesterday at 12:22:53 AM »

I'm intergrated by following this instructions: http://community.mybb.com/thread-87200.html

You did not do Step 3. Template Edits for Coppermine 1.5.x (In template.html, remove all the content between <DOCTYPE> and {CUSTOM_HEADER} and all the content below {CUSTOM_FOOTER}) and Step 6. Wrapper for MyBB 1.4.x/1.6.x  (Remember the template.html <head> items you saved when modifying that file? Now is the time to add those into the $headerinclude variable at the bottom of the wrapper. Otherwise you will loose the features of the CPG theme you are trying to implement. Do NOT overwrite the $headerinclude, but append to it.)

Those steps are mandatory for things to go right.

At step 7 Templates for MyBB 1.4.x or 1.6.x he includes forum title in the code:

Code: [Select]
<title>{$mybb->settings['bbname']}</title>
That's not a mistake, but makes coppermine use the forum title not the coppermine title (up in the browser will show RCLanka Forums, not Home - RCLanka Gallery.

Here http://www.communityplugins.com/forum/mydownloads.php?action=browse_cat&cid=10 you can find cpg mybb wrapper Version 1.4.0. It works just like ver 1.1 (the one you have). It also contains a mybb wrapper plugin for MyBB to add in forum_folder/inc/plugins but is not compatible with MyBB 1.8. I do not know what mybb wrapper plugin for MyBB can do in plus.

LET ME KNOW if the solution works for you.

Install instruction can be found here: http://community.mybb.com/thread-87200.html but they are very short. For begginers can be hard to understant so I posted a step by step tutorial since this plugin is a coppemine plugin.
CPG MyBB Wrapper plugin for MyBB and coppermine bridge - install instructios http://forum.coppermine-gallery.net/index.php/topic,78228.0.html 

« Last Edit: Yesterday at 02:56:21 PM by allvip »
Logged

paquito

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 12
Re: Album Manager not working in Coppermine
« Reply #17 on: Yesterday at 03:10:12 AM »

WoW It worked.  :D Thanks allvip and gmc. No problems found at the moment.

Thank you again allvip, for your all hard work.

Quote
What mistakes?

gmc solved that for me.

Bye. Have a great day.
Logged
Pages: [1]   Go Up
 

Page created in 0.131 seconds with 22 queries.