Page 3 of 4

Re: Phoca Gallery Button Plugin - Error 500

Posted: 28 Oct 2009, 19:53
by davidosullivan
Its a bit tricky to explain but I'll try:-

First up you'll need to copy a bunch of files from administrator/components/com_phocagallery to the front end components folder recreating the same folder structure:

components/com_phocagallery/libraries/phocagallery/file/filethumbnail.php
components/com_phocagallery/libraries/phocagallery/image/imagemagic.php
components/com_phocagallery/libraries/phocagallery/path/path.php
components/com_phocagallery/libraries/phocagallery/render/renderadmin.php
components/com_phocagallery/libraries/phocagallery/render/renderprocess.php
components/com_phocagallery/libraries/phocagallery/text/text.php
components/com_phocagallery/models/phocagallerylinkimg.php
components/com_phocagallery/views/phocagallerylinkcats/view.html.php
components/com_phocagallery/views/phocagallerylinkcats/tmpl/default.php
components/com_phocagallery/views/phocagallerylinkimg/view.html.php
components/com_phocagallery/views/phocagallerylinkimg/tmpl/default.php
components/com_phocagallery/views/phocagallerylinkimg/tmpl/default_slideshow.php
components/com_phocagallery/views/phocagallerylinkimg/tmpl/default_switchimage.php
components/com_phocagallery/views/phocagallerylinkimg/tmpl/default_slideshow.php
components/com_phocagallery/views/phocagallerylinkimg/tmpl/default_images.php
components/com_phocagallery/views/phocagallerylinks/view.html.php
components/com_phocagallery/views/phocagallerylinks/tmpl/default.php
components/com_phocagallery/phocagallery.php
--and the plugin--
plugins/editors-xtd/phocagallery.php

comment out the if clause that switches the pluging off in the front in plugins/editors-xtd/phocagallery.php at line 39

Code: Select all

/*if (!$mainframe->isAdmin()) {
			$button = null;
		}*/
Then add this to components/com_phocagallery/phocagallery.php at line 57

Code: Select all

phocagalleryimport('phocagallery.file.filethumbnail');

phocagalleryimport('phocagallery.file.fileupload');

phocagalleryimport('phocagallery.render.renderadmin');

phocagalleryimport('phocagallery.text.text');

phocagalleryimport('phocagallery.render.renderprocess');
then change the class at line 15 in the linkimg model (components/com_phocagallery/models/phocagallerylinkimg.php) from PhocaGalleryCpModelPhocaGalleryLinkImg to PhocaGalleryModelPhocaGalleryLinkImg (ie remove 'Cp')

The table view for the image table adds pagination by default and that causes a hiccup. You should really turn pagination off by modifying things further but I just switched it off by commenting out the following in components/com_phocagallery/views/phocagallerylinkimg/tmpl/default.php- like this

Code: Select all

<td colspan="6"><?php //echo $this->tmpl['pagination']->getListFooter(); ?></td>
And I think thats it. As I say I have not done much testing on this so backup everything first and keep copies of your original files.

Fingers crossed someone much cleverer than me at Phoca will be able to use this info to upgrade the plug-in properly.

I have also modified the mod_phocagallery_image module to use the Moefader to slideshow images. You can see that here:-
http://host.quksdns4.net/~pjagolf/

good luck

Re: Phoca Gallery Button Plugin - Error 500

Posted: 28 Oct 2009, 21:08
by davidosullivan
Just noticed the fader I posted looks crap in @?:!ing IE...

back to the drawing board....

Re: Phoca Gallery Button Plugin - Error 500

Posted: 28 Oct 2009, 22:13
by codejunkie
Thanks for the information.

Re: Phoca Gallery Button Plugin - Error 500

Posted: 13 Nov 2009, 21:35
by davidosullivan
UPDATE:

I just redid this following my instructions and there are a couple of other changes that need to be made. in the instructions above I said
then change the class at line 15 in the linkimg model (components/com_phocagallery/models/phocagallerylinkimg.php) from PhocaGalleryCpModelPhocaGalleryLinkImg to PhocaGalleryModelPhocaGalleryLinkImg (ie remove 'Cp')
but you also need to remove Cp from the other VIEWS so you need to change:-
  • phocaGalleryCpViewphocaGalleryLinks to phocaGalleryViewphocaGalleryLinks on line 14 in components/com_phocagallery/views/phocagallerylinks/view.html.php
    phocaGalleryCpViewphocaGalleryLinkImg to phocaGalleryViewphocaGalleryLinkImg on line 14 in components/com_phocagallery/views/phocagallerylinkimg/view.html.php
    and phocaGalleryCpViewphocaGalleryLinkCats to phocaGalleryViewphocaGalleryLinkCats on line 14 in components/com_phocagallery/views/phocagallerylinkcats/view.html.php
Hope that helps anyone making this work

Re: Phoca Gallery Button Plugin - Error 500

Posted: 16 Nov 2009, 23:51
by Jan
Great, thank for this info I hope I will find time to implement it soon.

thank you, Jan

Re: Phoca Gallery Button Plugin - Error 500

Posted: 26 Apr 2010, 18:53
by Jan
Hi, try to enable debug mode or error reporting to get more information:
https://www.phoca.cz/documents/16-joomla ... rs-on-site

Jan

Re: Phoca Gallery Button Plugin - Error 500

Posted: 13 Jul 2010, 01:12
by crashedfx
Hello davidosullivan,

You said you had files to try for front end button integration? my email is anton_skv-et-yahoo, can you help me out?
I'll be trying your instructions now that you wrote, but in case i wont be successful, if you could share your discovery i'd appreciate it.

Hello everybody else,
Or if anything better been released, can somebody point me to right direction?

I love Phoca, but really need that front end button, even if there is something incomplete i'll take it to work on and try.

Thanks,

CrashedFX a.k.a Joomla Noob

EDIT 2 MINS LATER: Wait... This is [solved]? Ugh... So confirmed that those instructions work 100%?

Re: Phoca Gallery Button Plugin - Error 500

Posted: 13 Jul 2010, 02:28
by crashedfx
Well i got it SOMEWHAT to work.....

My problem is, while mod_rewrite and all other SEF stuff is on, it transforms damn links, though i don't want it too... I mean while SEF is off and these links are AS IS, instructions above work fine. I mean with some CSS problems, but i'll iron out those.

These links need to be preserved while mod_rewrite + SEF stuff is on... Can anybody say from "top of the head" how to make Joomla not touch those links for its SEF stuff?

Code: Select all

$tmpl['categories'] = 'index.php?option=com_phocagallery&view=phocagallerylinkcats&tmpl=component&e_name='.$eName;
//$tmpl['category'] = 'index.php?option=com_phocagallery&view=phocagallerylinkcat&tmpl=component&e_name='.$eName;
$tmpl['images']	= 'index.php?option=com_phocagallery&view=phocagallerylinkimg&type=2&tmpl=component&e_name='.$eName;
$tmpl['image'] = 'index.php?option=com_phocagallery&view=phocagallerylinkimg&type=1&tmpl=component&e_name='.$eName;
$tmpl['switchimage']	= 'index.php?option=com_phocagallery&view=phocagallerylinkimg&type=3&tmpl=component&e_name='.$eName;
$tmpl['slideshow']= 'index.php?option=com_phocagallery&view=phocagallerylinkimg&type=4&tmpl=component&e_name='.$eName;
I'll figure out probably. Sorry for being slow... First time PHP:ing and first time modifying anything in joomla that doesent have a control panel.

Developers could probably solve this in 14.5 seconds...... I wonder why for months no updates on something first time PHPer was able to get to work.

I mean if website i was working on would actually pay money, they would buy some extremely expensive extension which has front end stuff build. But since its a charity, i get left with opening back end to even worse noobs than me or fixing this myself....

Phoca has such perfect and spotless rating, its strange that this part was ignored totally. :(

*sighs* But i have not right to complain about free stuff. :(

I should give it a whack and try to code a plug-in which fixes this whole problem. With David's start up boost rest is just getting a decent analyzer and installer i guess... oh what do i know....

Re: Phoca Gallery Button Plugin - Error 500

Posted: 16 Jul 2010, 15:17
by Jan
Hi, yes the problem by free extensions is time. It is not about you don't want to implement something it is about you have thousands of feature requests and you have no time to implement them.

But all links created in frontend in Phoca Extensions are created by JRoute method, which is a basic method of Joomla! framework, so maybe problems with SEO you should find in some other place :-(

Jan

Re: Phoca Gallery Button Plugin - Error 500

Posted: 16 Jul 2010, 21:27
by crashedfx
Jan wrote:Hi, yes the problem by free extensions is time. It is not about you don't want to implement something it is about you have thousands of feature requests and you have no time to implement them.

But all links created in frontend in Phoca Extensions are created by JRoute method, which is a basic method of Joomla! framework, so maybe problems with SEO you should find in some other place :-(

Jan
Jan, i actually fixed it all and got it working. I found a way around SEO links stuff. Would you like me to post entire set of changes i made in addition to dave's earlier posting? It actually works beautifully.

I didn't touch JRoute method, since im not that good with Joomla yet to be fluent with it's API, but they way i bypassed it is i converted those links into full ones instead of relative ones.

Code: Select all

// JOOMLA API PROBABLY HAS A API CALL THAT CAN DO THIS INSTEAD OF USING PHP CORE VARIABLE
// LIKE MAYBE JRequest::GetServerSomethingWhatever(); 
$domname = $_SERVER['SERVER_NAME'];

// ADDING ABSOLUTE URL MAKES IT IGNORE mod_rewrite ANS SEO STUFF
$tmpl['categories'] = 'http://'.$domname.'/index.php?option=com_phocagallery&view=phocagallerylinkcats&tmpl=component&e_name='.$eName;
Jan, don't worry about it. I do understand you're short on time. I'll find a way to make this all work properly, i mean it already works, but that $_SERVER['SERVER_NAME'] needs to be converted to proper API call, and all CSS i wrote for the front-end view needs to be separated into extra file. Those Images need to be moved to front-end dirs and stuff like that, and it needs a proper installer.

I'll open your Phoca Gallery Button Plugin's install scripts/xmls and see if i can include everything i made along with text of every change, and send you to inspect once its done. Its a interesting project for me.

Maybe that way it will be less time consuming for you. And later one maybe i could help some more with other stuff. :)
I can post it all here, or if you want to see it yourself first... PM me your email where to send it for your inspection.

Thanks for all your work Jan.

ADDED NEXT DAY: Oh crap... Now i realized there is another minor problem. For example what if User Categories are enabled? It would need to be customized even more to not include images from categories which are owned by another user. So user (maybe unless admin) could not include categories & images which didn't belong to him, only his categories & images and ones which are set to "-Nobody-".Maybe this is little bit beyond me..... But I'll give it a try. Might take a while though.

I'll post what i have so far in couple of days with instructions, maybe some users will give constructive input. This thread is kinda dead though.....