[Solved] Redirect page

CMSimple 4.0 und höher
Post Reply
carlo
Posts: 6
Joined: Sat 16. Mar 2013, 14:39

[Solved] Redirect page

Post by carlo »

I'm not able to make redirect page work.

I have clicked 'yes' and entered an external page: http://twikeindk.carlsen-web.dk/

but when entering the page it just redirects me to 'http://ole.carlsen-web.dk/?TWIKEing_not_biking' which is the page it should redirect from.

Either I'm missing something or it doesn't work.
Last edited by carlo on Sat 12. Jul 2014, 14:02, edited 1 time in total.
Gert
Posts: 2082
Joined: Sun 18. Nov 2012, 14:18

Re: Redirect page

Post by Gert »

Hello,

I don't really know, what you want to do.

Do you want to redirect http://ole.carlsen-web.dk/?TWIKEing_not_biking to http://twikeindk.carlsen-web.dk/?TWIKEing_not_biking (and switch back the same way)?

Here it works, click the page "Redirect" (at bottom of the leftside menu):

http://www.kstb.de/cmsimpledev/?Welcome_to_CMSimple

I don't know, what you are doing wrong, for that I would need the CMSimple Password for both installations (by PM),

Gert
Gert Ebersbach | CMSimple | Templates - Plugins - Services
carlo
Posts: 6
Joined: Sat 16. Mar 2013, 14:39

Re: Redirect page

Post by carlo »

Hi
I just want to redirect from http://ole.carlsen-web.dk/?TWIKEing_not_biking to http://twikeindk.carlsen-web.dk/?TWIKEing_not_biking

Someone pointed me to try enabling debug mode and from that I could see that a userfuncs.php that I have made a long time ago was causing the problem.

The code is this.

Code: Select all

<?php
/* Nothing special! Can sum upto 20 numbers, which was what I needed */
function sum($var1,$var2,$var3,$var4,$var5,$var6,$var7,$var8,$var9,$var10,$var11,$var12,$var13,$var14,$var15,$var16,$var17,$var18,$var19,$var20)
{
    $tot=$var1+$var2+$var3+$var4+$var5+$var6+$var7+$var8+$var9+$var10+$var11+$var12+$var13+$var14+$var15+$var16+$var17+$var18+$var19+$var20;
    return $tot;
}
?>
And I'm not quite sure how it should else be to work within the site?
Gert
Posts: 2082
Joined: Sun 18. Nov 2012, 14:18

Re: Redirect page

Post by Gert »

Hello,

how you call the function sum() ? This way: sum('2','5') misses the other variables, so you should predefine them:

Code: Select all

<?php // utf-8 marker: äöü

/* Nothing special! Can sum upto 20 numbers, which was what I needed */
function sum($var1='0',$var2='0',$var3='0',$var4='0',$var5='0',$var6='0',$var7='0',$var8='0',$var9='0',$var10='0',$var11='0',$var12='0',$var13='0',$var14='0',$var15='0',$var16='0',$var17='0',$var18='0',$var19='0',$var20='0')
{
    $tot=$var1+$var2+$var3+$var4+$var5+$var6+$var7+$var8+$var9+$var10+$var11+$var12+$var13+$var14+$var15+$var16+$var17+$var18+$var19+$var20;
    return $tot;
}

?>
But there are better options, using an array,

Gert
Last edited by Gert on Sat 12. Jul 2014, 14:02, edited 1 time in total.
Gert Ebersbach | CMSimple | Templates - Plugins - Services
carlo
Posts: 6
Joined: Sat 16. Mar 2013, 14:39

Re: Redirect page

Post by carlo »

I call it like this

Code: Select all

{{{PLUGIN:sum(25300,-17338,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}}}
but it works now there was two empty lines in userfuncs.php after ?> and after removing them everytging works just fine
Gert
Posts: 2082
Joined: Sun 18. Nov 2012, 14:18

Re: [Solved] Redirect page

Post by Gert »

Hi Carlo,

with a userfuncs.php you can kill each CMSimple Installation.

Be carefully - Gert ;)
Gert Ebersbach | CMSimple | Templates - Plugins - Services
Post Reply