[Zope] Icons in a product

2000-09-08 Thread Petr Knapek

Hi Zopists,
I would like to know if there is any possibility how to publish an icon
on the web which is in www folder of my own created product. That is I
want to put some icons into the www folder of my product and to have
possibility to show them on the web. The problem with my own stylesheet
of my product is similar. Is there any possibility to put it in the
product (not ZODB) and later use it. In both cases I don't want put
anything into /Control_Panel/Products/myProduct/ over web interface. I
use Zope 2.1.6

I need to put any icon into my python product and later have possibility
to call this icon on the web. Where to put it in my folder structure on
the box and what the URL will be?

Thanks for help, Petr

-- 
Petr Knpek
NEXTRA Czech Republic, s.r.o., Veve 102, 659 10 Brno, Czech Republic
e-mail: mailto:[EMAIL PROTECTED]
tel:+420-5-41 558 394
FAX:+420-5-41 558 390

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Icons in a product

2000-09-08 Thread Petr Knapek

 On Fri, 8 Sep 2000 23:18:40 +1000, Andrew Kenneth Milton 
[EMAIL PROTECTED] said:

Hi Andrew,
thank you very much for quick answer but I it doesn't work because
in my __init__.py I register the product with the initialize(context)
function.

def initialize(context):
try:
context.registerClass(
ISNG.ISNGDocument,
constructors = (
ISNG.manage_addISNGDocumentForm,
ISNG.manage_addISNGDocument),
icon = 'www/Document_icon.gif'
)
except:
import sys, traceback, string
type, val, tb = sys.exc_info()
sys.stderr.write(string.join(traceback.format_exception(type, val, tb), ''))
del type, val, tb

I think (not sure) that misc_={'iconId':
ImageFile('www/icon.gif',globals()).} will work only if product is not
registered by the old way (not my case) because I tried to put it on
different places of my __init__.py and wasn't succesfull.

Please, can anybody help me or give me a URL where the problems noted
below are solved. 

Thanks, Petr

AKM +---[ Petr Knapek ]-- | Hi Zopists, | I
AKM would like to know if there is any possibility how to publish
AKM an icon | on the web which is in www folder of my own created
AKM product. That is I | want to put some icons into the www folder
AKM of my product and to have | possibility to show them on the
AKM web. The problem with my own stylesheet | of my product is
AKM similar. Is there any possibility to put it in the | product
AKM (not ZODB) and later use it. In both cases I don't want put |
AKM anything into /Control_Panel/Products/myProduct/ over web
AKM interface. I | use Zope 2.1.6 | | I need to put any icon into
AKM my python product and later have possibility | to call this
AKM icon on the web. Where to put it in my folder structure on |
AKM the box and what the URL will be?  | | Thanks for help, Petr

AKM In your __init__.py;

AKM from ImageFile import ImageFile

AKM misc_={'iconId': ImageFile('www/icon.gif',globals()).}

AKM You then reference it is as:-

AKM img src="/misc_/YourProductName/iconId"



-- 
Petr Knpek
NEXTRA Czech Republic, s.r.o., Veve 102, 659 10 Brno, Czech Republic
e-mail: mailto:[EMAIL PROTECTED]
tel:+420-5-41 558 394
FAX:+420-5-41 558 390

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Icons in a product

2000-09-08 Thread Andrew Kenneth Milton

+---[ Petr Knapek ]--
| Hi Zopists,
| I would like to know if there is any possibility how to publish an icon
| on the web which is in www folder of my own created product. That is I
| want to put some icons into the www folder of my product and to have
| possibility to show them on the web. The problem with my own stylesheet
| of my product is similar. Is there any possibility to put it in the
| product (not ZODB) and later use it. In both cases I don't want put
| anything into /Control_Panel/Products/myProduct/ over web interface. I
| use Zope 2.1.6
| 
| I need to put any icon into my python product and later have possibility
| to call this icon on the web. Where to put it in my folder structure on
| the box and what the URL will be?
| 
| Thanks for help, Petr

In your __init__.py;

from ImageFile import ImageFile

misc_={'iconId': ImageFile('www/icon.gif',globals()).}

You then reference it is as:-

img src="/misc_/YourProductName/iconId"

Please excuse any obvious mistakes in this I'm a little sloshed at the
moment d8)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Icons in a product

2000-09-08 Thread Andrew Kenneth Milton

+---[ Petr Knapek ]--
|  On Fri, 8 Sep 2000 23:18:40 +1000, Andrew Kenneth Milton 
|[EMAIL PROTECTED] said:
| 
| Hi Andrew,
| thank you very much for quick answer but I it doesn't work because
| in my __init__.py I register the product with the initialize(context)
| function.

It doesn't go inside your initialize function, sorry about that.

It's a 'global' variable in your __init__.py

etc..

misc_={
'subagency': ImageFile('subagency.gif',globals()), #little
'SubAgencyIcon': ImageFile('SubAgency.gif',globals()), #big
'agent': ImageFile('agent.gif',globals()),
'company': ImageFile('company.gif', globals()),
'CompanyIcon': ImageFile('CompanyIcon.gif',globals()),
'client': ImageFile('client.gif',globals()),
'ClientIcon':ImageFile('ClientIcon.gif',globals()),
}

def initialize(context):

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )