Author Topic: phprint geht nicht wenn Kategorie nur für regist. user ist  (Read 11250 times)

0 Members and 1 Guest are viewing this topic.

Offline magicx

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.tech4um.de
phprint geht nicht wenn Kategorie nur für regist. user ist
« on: December 18, 2002, 05:11:03 PM »
Hallo Leute,

phprint (http://www.mikenew.net/printfriendly.php) ist zwar ne feine Sache aber leider funktioniert es nicht wenn eine Kategorie nur für regist.
User sichtbar ist, d.h. die Seite wird leer angezeigt.
Setze ich die Rechte auf Alle wird die Seite problemlos angezeigt.

Nun habe ich versucht ins phprint-script das mit dem check_permission
einzufügen, leider klappt es doch nicht (besser gesagt ich weiss nicht
genau wohin es soll u. wie die syntax lauten soll)

es wäre sehr hilfreich wenn mir jemand einen tipp geben kann.

vielen dank schon mal im vorraus

Harald
Harald
---------------------------------
   ("<     >")
_(  ..)__(..  )__
   //           \\

Offline magicx

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.tech4um.de
phprint geht nicht wenn Kategorie nur für regist. user ist
« Reply #1 on: December 20, 2002, 05:30:54 PM »
schade,
ich dachte das phprint auch von anderen benutzt wird.
naja, dann schaue ich mich mal nach etwas anderem um.

trotzdem danke ......
Harald
---------------------------------
   ("<     >")
_(  ..)__(..  )__
   //           \\

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Come again?
« Reply #2 on: December 20, 2002, 07:53:59 PM »
I use phprint from www.mikenew.net/printfriendly.php but can't read German.  Any chance you could repost your issue in English?  Perhaps I can help.

Offline magicx

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.tech4um.de
phprint geht nicht wenn Kategorie nur für regist. user ist
« Reply #3 on: December 21, 2002, 12:21:57 AM »
if the permission read of a category is "all" phprint list all thumbnails from the page, but if the read permission is "registered user", "privat" or "admin" only a empty side is indicated. (regist. user is logged in with  permission to read this category)

-- translated with babelfish ----
Now I have tried in phprint script with check_permission to insert, unfortunately fold it nevertheless not (better said I do not point exactly where it is and like the syntax read is)
-- translated with babelfish ----
- a good idea is to use http://babelfish.altavista.com -Word Translator -

i hope you can read the translation and helpe me....
Harald
---------------------------------
   ("<     >")
_(  ..)__(..  )__
   //           \\

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Not sure what you want
« Reply #4 on: December 21, 2002, 12:40:57 AM »
I think I understand but do not know exactly when you want phprint to work.  

Do not modify phprint.  Instead try like this in the templates:

If administrator:
Code: [Select]
{if admin_links}
    <a href="phprintWImage.php" target="_blank">Print</a>
{endif admin_links}

If logged in:
Code: [Select]
{if user_loggedin}
    <a href="phprintWImage.php" target="_blank">Print</a>
{endif user_loggedin}

If permission to download:
Code: [Select]
{if allow_download}
    <a href="phprintWImage.php" target="_blank">Print</a>
{endif allow_download}

So phprint shows on the page only if 4images permission is met, otherwise they do not get the link.

I hope this helps.

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
phprint geht nicht wenn Kategorie nur für regist. user ist
« Reply #5 on: December 21, 2002, 12:45:37 AM »
OK, I think this babelfish thingys are quite hilarious :)
The 1st paragraph hasn't been translated too bad but the 2nd is barely understandable. Let me try to help out a little (I don't know phprint but it sounds interesting so I'm interested in the possible solution):

magicx writes:
Quote

phprint might be a nice tool but it doesn't work if a category is only visible for registered users, i.e. only an empty page is displayed then. If I set the access rights to "all" the page is displayed properly.

I've tried to include the check_permission into the phprint script but it didn't work so far (to be precise, I actually don't know where to put or how the syntax has to look like).


@magicx, ich hoffe es ist OK, wenn ich das übersetze?

cheers,
Bernd

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Okay
« Reply #6 on: December 21, 2002, 12:47:30 AM »
I think I understand the problem now.  Let me think a little about it, I have to get back to work now.

Offline magicx

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.tech4um.de
phprint geht nicht wenn Kategorie nur für regist. user ist
« Reply #7 on: December 21, 2002, 01:09:30 AM »
@bernd

danke, der erste satz ist ohne babelfish (von mir) den zweiten dachte ich ist besser mit babelfish zu übersetzen, scheint ja nur müll zu sein.
also, werde ich besser selber schreiben so gut es geht.
es ist doch immer schön wenn einem geholfen wird.

@Chris
phprint is correct installed and the startprint and stopprint tag is also correctly inserted.
again thanks ....
Harald
---------------------------------
   ("<     >")
_(  ..)__(..  )__
   //           \\

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
My status
« Reply #8 on: December 22, 2002, 01:44:40 AM »
With my current schedule, I will not be able to put any time into this until after Christmas.

Offline magicx

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • http://www.tech4um.de
phprint geht nicht wenn Kategorie nur für regist. user ist
« Reply #9 on: December 22, 2002, 11:34:58 PM »
it's ok.

if you find a solution then let me know it.
Harald
---------------------------------
   ("<     >")
_(  ..)__(..  )__
   //           \\

Offline arnoud

  • Newbie
  • *
  • Posts: 37
    • View Profile
Same problem
« Reply #10 on: January 21, 2003, 02:29:19 PM »
I have the same problem, I want to print the lightbox without the menu on the leftside. I also want to print things that are blocked for some users, this is so far I can find impossible.

I have the following idea, I want to add a second lightbox template, I have called it 'printlightbox'

At the moment the template is exaxtly the same as the 'lightbox' template. I call it on with the URL:
http://www.mysite.com/4imgages/index.php?template=printlightbox

The lightbox stays empthy.

Does anybody know how I can fix it in a right way?

Offline arnoud

  • Newbie
  • *
  • Posts: 37
    • View Profile
phprint geht nicht wenn Kategorie nur für regist. user ist
« Reply #11 on: January 21, 2003, 03:19:47 PM »
I have found the solution, i have dublicate lightbox.php and called the duplicate printlightbox.php

And I have changed the folowing

Code: [Select]
$templates_used = 'printlightbox,thumbnail_bit';
$main_template = "lightbox";


to

Code: [Select]
$templates_used = 'printlightbox,thumbnail_bit';
$main_template = "lightbox";

[/code]

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: Okay
« Reply #12 on: January 21, 2003, 06:46:14 PM »
Quote from: Chris
I think I understand the problem now.  Let me think a little about it, I have to get back to work now.

Sorry for no reply, I really haven't had any time.  All I can add is that phprint.php runs as a separate PHP process on the server and so has no knowledge of the 4images session or category permissions.  This is why the resulting page is blank.  

The real solution would be to incorporate the phprint code directly in the 4images code, perhaps in categories.php  And this is something I simply don't have time to investigate.  :roll: