Posted: Fri Jan 11, 2008 1:15 am Post subject: Problems with upgrading phpbb Integration
I've upgraded my gallery to version 2.2.4 and I'm upgrading the integration with phpbb to the newest version 0.5.10. Unfortunately, I'm having quite a few problems as I have a heavily modded board, and I'm hoping you can help me.
First off, this is the error I'm getting every time I look at my profile:
Code: › Parse error: syntax error, unexpected T_IF in /home/xxx/public_html/forum/includes/bbcode.php on line 1
Any idea what might cause that? I've double checked this line of code and it is installed properly:
What does this portion of the code do? Is this the part that lets you use a BBcode to post pictures directly from Gallery 2? If so, can that part be left out (or give me another value to assign to my bbcode other than g_help.
Also, I've got a problem with this line of code in the installation:
I cannot find that line of text anywhere in the file at all.
Additionally, I'm running the Xtreme Styles mod, which completely replaces template.php with another file. Is this section of the code critical or can it be left out?
I'm pretty stumped here, there's so many issues I need to figure out , primarily is just what can be left out just to get the integration working again.
That is the help message when hovering over the g2Img button. You can change it to anything, but you will have to change all instances of it in the integration. If you are using it already, you are probably also using the 'G' button code already and will have to change it as well.
Posted: Fri Jan 11, 2008 10:20 pm Post subject: Re: Problems with upgrading phpbb Integration
<sigh> Yeah, I can't find that code in admin_db_utilities.php at all. I think it might have been removed with another hack. My board is working fine without it, so that makes me think I removed it for another hack. How critical is that piece?
So if the UTF-8 stuff isn't required, can this piece be left out as well?
Code: › #
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
My template.php is nothing like the old one - I know you guys can't prepare for every single hack out there (nor would I expect you to), so that's why I'd like to know if the UTF code can be left out.
I cannot for the life of me figure out where the problems are with bbcode.php, and which piece of the code is the one screwing with it. It would be nice if along with the package Dari had included an "upgrades" section you could do if you had previously installed an older package. There is probably some leftover code from the older package that might be screwing something up, so I'm gonna have to "reupload" a clean, working version of my board with the old integration installed, go reverso through the old install instructions (if I still have them) and start from scratch that way. I just can't see any other way to do it and still be sure some legacy code isn't messing me up some way. It might be worth it to have somewhere on the site that has all the versions of the old upgrade instructions for people like me who might miss a few between all the updates.
And the gallery upgrade from 2.1.1 to 2.2.4 was so easy and had me so positive this one would be easy as well.
Posted: Wed Jan 23, 2008 12:56 am Post subject: Re: Problems with upgrading phpbb Integration
Thanks for your help Jettyrat. Thanks to you I got the integration working. Your help with deciding what I didn't have to use (the UTF stuff) was helpful. I realized I didn't need the edits in admin_db_utilities.php either as all that does is specify the gallery tables to backup using phpbb. I backup using a cron job or phpMyAdmin, so I don't have to worry about that part of the hack.
I do have one bit I was hoping you could help me with. The g2image bbcode is not working, and I know it's because I've messed up naming it to another variable. Would changing the G in the second variable to a V work? (See below)
Code: › #
#-----[ OPEN ]------------------------------------------
#
posting.php
function g2ic_open(form, field) {
var url = './g2image/g2image.php?g2ic_form='+form+'&g2ic_field='+field;
var name = 'g2image';
var w = 600;
var h = 600;
var valLeft = (screen.width) ? (screen.width-w)/2 : 0;
var valTop = (screen.height) ? (screen.height-h)/2 : 0;
var features = 'width='+w+',height='+h+',left='+valLeft+',top='+valTop+',resizable=1,scrollbars=1';
window.open(url, name, features);
}
I have changed it multiple times but it continues to error out on my posting page. What is the bbcode generated? And what info should you put in between it to get it to show images from the gallery? It's strange, it's broken all the other bbcode buttons as well.
Additionally, I am running into problems with the "All Gallery Links in Profile" mod - it is not working even though all the edits are correct (I've checked three times). It was working with my old 2.1.1 version of gallery, but once I upgraded to the new version of the bridge and the version of Gallery Links that was in the newest bridge, it was no longer working. My new Gallery version is 2.2.4.
It appears as though it is not picking up the items in the gallery:
Nothing appears in the box.
I have a hunch the code in g2helper.inc is not working or malfunctioning with the newest version of Gallery (2.2.4).
Posted: Thu Jan 24, 2008 3:44 pm Post subject: Re: Problems with upgrading phpbb Integration
Quote: › I do have one bit I was hoping you could help me with. The g2image bbcode is not working, and I know it's because I've messed up naming it to another variable. Would changing the G in the second variable to a V work? (See below)
There is also the button code that needs to be changed {helpline('v')} in templates/subSilver/posting_body.tpl
Quote: › Additionally, I am running into problems with the "All Gallery Links in Profile" mod - it is not working even though all the edits are correct (I've checked three times). It was working with my old 2.1.1 version of gallery, but once I upgraded to the new version of the bridge and the version of Gallery Links that was in the newest bridge, it was no longer working. My new Gallery version is 2.2.4.
If I remember correctly this is broken in the 0.5.10 release and I fixed it in the 0.5.11 release (that Dari has not released yet). Try replacing the mapAllGalleryLinks function in g2helper.inc with this one:
Code: › function mapAllGalleryLinks($userId, $albums, $limit) {
global $gallery, $lang;
$this->_initAdmin();
$ret = GalleryEmbed::isExternalIdMapped($userId, 'GalleryUser');
if (empty($ret)) {
list ($ret, $entityId) = GalleryCoreApi::loadEntityByExternalId($userId, 'GalleryUser');
if (isset($ret)) {
$this->_errorHandler(GENERAL_ERROR, sprintf($lang['G2_LOADENTITYBYEXTID_FAILED'], $userId) . $lang['G2_ERROR'] . $ret->getAsHtml(), __LINE__, __FILE__);
}
list ($ret, $itemIds) = GalleryCoreApi::fetchAllItemIdsByOwnerId($entityId->getId());
if (isset($ret)) {
$this->_errorHandler(GENERAL_ERROR, sprintf($lang['G2_FETCHITEMSBYOWNER_FAILED'], $entityId->getId()) . $lang['G2_ERROR'] . $ret->getAsHtml(), __LINE__, __FILE__);
}
list ($ret, $descendentCounts) = GalleryCoreApi::fetchDescendentCounts($itemIds, $entityId->getId());
if ((count($descendentCounts) < 1) || (isset($ret) && $ret->getErrorCode() & ERROR_STORAGE_FAILURE)) {
/*
* User has no items to display!
*/
$this->done();
return null;
}
elseif (isset($ret)) {
$this->_errorHandler(GENERAL_ERROR, sprintf($lang['G2_FETCHDESCENDCOUNTS_FAILED'], $entityId->getId()) . $lang['G2_ERROR'] . $ret->getAsHtml(), __LINE__, __FILE__);
}
Posted: Tue Jan 29, 2008 12:27 am Post subject: Re: Problems with upgrading phpbb Integration
Okay, I plugged that new function into the g2helper.inc file, and I got this error:
It looks like it wants to build it but it doesn't quite get there. (Note the "Array" word where it previously said "Gallery Items for Gondee: 0 items")
Also, do I need to have a special G2Image module installed to get the BBcode to work? I researched elsewhere and ran across that plugin, and I wondered if it applied to this. I do have the ImageBlock module installed and working, but I wasn't sure if this was something different. Just in the future, I would recommend documenting if you need to install something else to get the bbcode to work - as it stands now I have all the stuff changed and it's still not working, and I'm thinking of just leaving out that particular part of the install since it's breaking the bbcodes on my test board. It's not critical is it?
Posted: Tue Jan 29, 2008 11:26 am Post subject: Re: Problems with upgrading phpbb Integration
Hmm...I guess I changed something in the memberlist code also then. Maybe try the 0.5.11 integration, as you are not using the latest mods anyway.
There is no special g2image module, so there is nothing to document. Your problems with the bbcode are the result of conflicts with the other mods you have installed.
Posted: Thu Feb 21, 2008 10:30 pm Post subject: Re: Problems with upgrading phpbb Integration
It looks like this did the trick Jettyrat! Thanks! You might make a note in the install that if you don't have individual galleries for users you have to turn off the feature that puts the button in each post and profile or it'll throw an error or 404 when you select that link.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum