Function for forwarding in page_params plugin (CMSimple_XH)

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by Holger » Fri Sep 25, 2009 8:01 am

johnjdoe wrote:Sorry Holger for not agreeing with your argumentation. I think that the page_params developer SHOULD integrate this interesting new feature. It has nothing to do with "garbage".
No problem Gerd.
About the "garbage": of course it has nothing to do with your proposition and I won't say that your request is "garbage".
It schould point you to our discussion on unused fields in pagedata.php / keeping the "database" small, ok?

Holger

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by Gert » Fri Sep 25, 2009 8:35 am

johnjdoe wrote:Small example: You have these menu entries:

Entry 1
+--SubEntry 1
+--SubEntry 2
+--SubEntry 3
Entry 2

For a reason whatever, your customer would not put text in "Entry 1" but wish that when a visitor clicks on "Entry 1" that he lands directly on "SubEntry 1".
In this case I understand your suggestion. Now we have to decide, if we include it by default ... Now I am not sure anymore.

Should we split the page_params Plugin into "basics" and "more"? Make another Plugin "page_params_plus" based on page_params with additional features, additional downloadable? Let us collect the ideas and sort thematic.
Last edited by Gert on Fri Sep 25, 2009 12:54 pm, edited 1 time in total.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

johnjdoe
Posts: 571
Joined: Tue May 20, 2008 6:32 am

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by johnjdoe » Fri Sep 25, 2009 11:05 am

Holger wrote:It schould point you to our discussion on unused fields in pagedata.php / keeping the "database" small, ok?
OK, no problem! I understood it ... ;-)

johnjdoe
Posts: 571
Joined: Tue May 20, 2008 6:32 am

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by johnjdoe » Fri Sep 25, 2009 11:07 am

It is not in direct connection with my suggestion but Thorstens idea is not bad too.

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by mvwd » Fri Sep 25, 2009 3:26 pm

I think it's ok to add this function into page_params. If all the others agree, i'll add it into PL V.2.1 beta7.

@Torsten: Simple plugin-calls can be done within content by placing {{{PLUGIN:plugin_function();}}} somewhere you want it's output. It's a just undocumented function of Pluginloader V.2.1.

mvwd.

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by Gert » Fri Sep 25, 2009 3:53 pm

mvwd wrote:If all the others agree, i'll add it into PL V.2.1 beta7.
OK, do it, but I think you should remove the "http://" from Martins snippet, so the user can copy the complete URL from the address line of the browser. But that's just my opinion ;)

Or remove the "http://" of the input by php.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

johnjdoe
Posts: 571
Joined: Tue May 20, 2008 6:32 am

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by johnjdoe » Mon Sep 28, 2009 6:48 am

Gert wrote:
mvwd wrote:If all the others agree, i'll add it into PL V.2.1 beta7.
OK, do it, ...
Excellent, I'm happy! Thanks!

Gert
Posts: 3078
Joined: Fri May 30, 2008 4:53 pm
Location: Berlin
Contact:

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by Gert » Mon Sep 28, 2009 7:28 am

johnjdoe wrote:Excellent, I'm happy! Thanks!
But I think anyway, we should think abaut splitting page_arams, if we or others are having more ideas for the page_params Plugin. Basic functions in page_params, the rest in page_params_plus, not included in CMSimple_XH by default, provided as an addtitional download.
Gert Ebersbach | CMSimple | Templates - Plugins - Services

johnjdoe
Posts: 571
Joined: Tue May 20, 2008 6:32 am

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by johnjdoe » Fri Oct 02, 2009 11:47 am

mvwd wrote:I think it's ok to add this function into page_params. If all the others agree, i'll add it into PL V.2.1 beta7.
May I ask how far this is progressed?

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Function for forwarding in page_params plugin (CMSimple_XH)

Post by mvwd » Sun Oct 04, 2009 8:37 am

...it's already done. I will release a RC in a few minutes for testing.
I added some simple check, if it is an internal or external link to enlarge the link always to a full qualified URI (that's what the protocol wants). And i removed the fsockopen() (sorry Martin). I think it's unnecessary. Users can decide if the URI is correct or not byself, dont you think?

My function looks like this:

Code: Select all

		if($values['use_header_location'] == '1' AND trim($values['header_location']) !== '') { 
			if(!preg_match('"(http|https|ftp|mailto):"si', $values['header_location'])) {
				$values['header_location'] = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$values['header_location'];
			}
			$c[$key]  = '#CMSimple header("Location:'. $values['header_location'] .'"); exit; #';
		} 
Any enhancements are welcome.
mvwd.

Post Reply