Add "Print" to Siriux Theme

gregmills

Joined: 2007-10-02
Posts: 6
Posted: Sat, 2007-10-13 14:48

I've been working on this problem for a week. I guess I don't know enough about PHP to figure it out on my own.

I have a gallery site where I am using the Digibug service for ordering prints. In the Matrix theme there is a button in the sidebar on the photo page that says "Print to Digibug." If I switch to the Siriux theme that button does not appear.

The site's layout is based on Siriux so I really need to move this one button into the photo page on the Siriux theme. Any suggestions?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2007-10-13 20:16

Siriux does not have a sidebar. You can add 'item actions' to the photo page. Edit album theme tab 'blocks to show on photo page'.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
gregmills

Joined: 2007-10-02
Posts: 6
Posted: Sun, 2007-10-14 01:33

Thanks,

That works but it's not very intuitive from my customer's point of view. Is there anyway I can modify the code in photo.tpl so that I can place a simple "Print to Digibug" link on the page?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-10-14 02:09

I don't have a digibug account so cant realy test but try:

<a href="{g->url arg1="view=digibug.DigibugPrintPhotos" arg2="itemId=`$theme.item.id`"
			     forceFullUrl=true forceSessionId=true}">print with digibig</a>

If not then I will have to set up an account ( is it free? ) or can you PM me your 'Digibug Company ID' and 'event ID'.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
gregmills

Joined: 2007-10-02
Posts: 6
Posted: Sun, 2007-10-14 02:24

That looks like what I'm going for but I get an error when I click it.

Quote:
Authentication Failure
Your change cannot be completed due to a loss of session data. Please try again. If it still doesn't work, try logging out and logging back in.

Back to the Gallery

Error Detail -
Error (ERROR_REQUEST_FORGED)
in modules/core/classes/GalleryController.class at line 239 (GalleryCoreApi::error)
in main.php at line 402 (GalleryController::assertIsGenuineRequest)
in main.php at line 94
in main.php at line 83

I did try logging out and logging back in on two different acounts but it still didn't work. Digibug is free but I don't mind PMing you my information if it would help. Thanks a lot!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-10-14 02:26

try:
<a href="{g->url arg1="view=digibug.DigibugPrintPhotos" arg2="itemId=`$theme.item.id`" forceFullUrl=true forceSessionId=true useAuthToken=1}">print with digibig</a>

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
gregmills

Joined: 2007-10-02
Posts: 6
Posted: Sun, 2007-10-14 02:46

I really appreciate this. I got a different error this time.

Quote:
Security Violation
The action you attempted is not permitted.

Back to the Gallery

Error Detail -
Error (ERROR_BAD_PARAMETER)
in modules/digibug/DigibugPrintPhotos.inc at line 60 (GalleryCoreApi::error)
in main.php at line 433 (DigibugPrintPhotosView::renderImmediate)
in main.php at line 94
in main.php at line 83

Your previous tip about the "Item Actions" might work out. I found out I can switch that display from a drop down list to regular links. When I'm logged in as a guest all they see is the "print on Digibug" link. I'd rather be able to move the link around anywhere I want it in the template, but I think this will work.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-10-14 03:08

OK looks like we are close. Just complaining about the return url now. let me dig.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2007-10-14 03:22

<a href="{g->url arg1="view=digibug.DigibugPrintPhotos" arg2="itemId=`$theme.item.id`" arg3="returnUrl=%CURRENT_URL%" useAuthToken=1}">print with digibig</a> __SHOULD__ do the trick.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
gregmills

Joined: 2007-10-02
Posts: 6
Posted: Sun, 2007-10-14 10:25

That's the one. It works flawlessly now. Thanks for everything!