MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: trying to build a link to categories using perl



******    message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com>     ******

I just ran across something in the manual that may be of help to you.

<quote>
TIP: This will not work in the new style as it did in the old:

	[page scan/se=[scratch somevar]]

To get the output of the [scratch somevar] interpreted, you must place it
within a named and quoted attribute:

	[page href="scan/se=[scratch somevar]"]

-Ryan

At 02:28 PM 1/8/99 , you wrote:
>I'm not using frames, though--isn't area just for frames?
>
>At 01:29 PM 1/8/99 -0700, you wrote:
>>Correction below.
>>
>>
>>>******    message to minivend-users from NOW Internet Coordinator
>><webperson@now.org>     ******
>>>
>>>I'm using Minivend 3.04 (haven't upgraded Perl yet to 5.004).
>>>
>>>I'm trying to make my categories field link to scans using those
>categories. 
>>>I've taken some Perl code someone posted to the list a while ago and
>modified
>>>it, and it*almost* works, but not quite.  It produces this HTML code:
>>>
>>><b><FONT COLOR="#400080">Category: </b></font> 
>>> [page scan/se=Children/sf=category]Children</a> 
>>> [page scan/se=Art/sf=category]Art</a> 
>>> [page scan/se=Diversity/sf=category]Diversity</a> 
>>>
>>>
>>>[/page] gets changed to </A>, but not [page scan...]
>>>
>>>
>>>Here is the code:
>>>
>>><b><FONT COLOR="#400080">Category: </b></font> 
>>>[perl]
>>>$categories = q%[item-field category]%;
>>>$itemcat = q%[item-field category]%;
>>>@categories = split(/,/,$categories);
>>>foreach $category (@categories) {
>>>        $RealCat = $category;
>>>        $category =~ s/\s+//;
>>>        ($itemcat eq $category) ? 
>>>($catstring = qq% [page scan/se=$category/sf=category]$category[/page] %) :
>>>($catstring = qq% [page scan/se=$category/sf=category]$category[/page] %);
>>
>>Try using [area] instead, something like:
>>
>>($catstring = qq% <A HREF="[area
>>scan/se=$category/sf=category]">$category</A> %)
>>
>>I'm not much of a PERL programmer, so be sure to handle the quotes and
>>other symbols correctly.
>>
>>>
>>>
>>>        push(@options,$catstring);
>>>}
>>>$output = join("\n",@options);
>>>$output;
>>>[/perl]
>>>
>>>
>>>Ideas?
>>>
>>>P.S.  Is anyone else with Solaris 2.5 and Perl 5.003 successfully using
>>>Minivend 3.11?   
>>>------------------------------------------------------------------
>>>Sarah  Stapleton-Gray
>>>NOW LAN and Internet manager.  Please visit http://www.now.org/
>>>-
>>>To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
>>>email with 'UNSUBSCRIBE minivend-users' in the body to
>>Majordomo@minivend.com.
>>>Archive of past messages: http://www.minivend.com/minivend/minivend-list
>>> 
>>
>>Ryan Hertz                                                tel  520-645-3812
>>Webmaster                                                 tel  800-645-BAIT
>>Advertising Director                                      fax  520-645-2588
>>Gary Yamamoto Custom Baits, Inc.              http://www.yamamoto.baits.com
>> 
>------------------------------------------------------------------
>Sarah  Stapleton-Gray
>NOW LAN and Internet manager.  Please visit http://www.now.org/
> 

Ryan Hertz                                                tel  520-645-3812
Webmaster                                                 tel  800-645-BAIT
Advertising Director                                      fax  520-645-2588
Gary Yamamoto Custom Baits, Inc.              http://www.yamamoto.baits.com
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: