[wikka-community] Page forward (was Site forward)

ddevine ddevine
Mon Feb 4 13:48:43 GMT 2008


Dario Taraborelli wrote:
> Krzysztof,
>
> I'm curious to know if you tried to test/update Dreck's code
>
> http://wikkawiki.org/RedirectingPages
>
> Dario
>
> On 3 Feb 2008, at 17:12, Krzysztof Trybowski wrote:
>
>   
>> Dnia 1 lutego 2008 mahefa randimbisoa napisal(a):
>>     
>>> Create a file redirect.php in actions/ folder and add put in it the
>>> following code:
>>> <?php
>>> @ob_end_clean();
>>> header('Location: '.$this->Href('', $page));
>>> die();
>>> ?>
>>>       
>>> Now, use just the following code inside the page bestofbeer:
>>>       
>>> {{redirect page="beer"}}
>>>       
>> Let's better add some basic checks to the code:
>> -if $page is set and non-empty
>> -if we don't redirect to the same page
>>
>> It doesn't check if we didn't make a loop of more pages, but this
>> would require some more coding. For now the simple solution would be
>> like this:
>>
>>
>> <?php
>> if (isset($page) and $page != '' and $this->GetPageTag() != $page) {
>>        @ob_end_clean();
>>        header('Location: '.$this->Href('', $page));
>>        die();
>> } else {
>>        echo('Redirect error!');
>> }
>> ?>
>>
>> Regards, KT
>>
>> -- 
>> Krzysztof Trybowski
>>  Gadu-Gadu: 1458144 --- Skype: trybowski
>>  AQQ: 141062 --- ICQ: 4350719 --- gpg key-id: 0xC937B0F2
>>     
>
>
> --
> Dario Taraborelli
> Wikka Development Team
> http://wikkawiki.org
>
>
> _______________________________________________
> WikkaWiki Community mailing list
> community at wikkawiki.org
> http://mail.wikkawiki.org/mailman/listinfo/community_wikkawiki.org
>   
I tried this with the most recent version and it called an error to a 
php function (didn't write it down).  Hence for my new post (and also I 
did not see this one before sending it, else I would have commented on 
this thread.

-- 


Derrick Devine, Technical Writer
phone: (919) 851-3984 x2151
fax: (919) 851.3985
rPath, Inc., The Software Appliance Company
701 Corporate Center Drive
Raleigh, NC 27607
www.rPath.com



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://mail.wikkawiki.org/pipermail/community_wikkawiki.org/attachments/20080204/28c875a4/attachment.bin 



More information about the community mailing list