Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DynPages plugin
#51
(2013-08-31, 00:46:28)Carlos Wrote:
(2013-08-30, 23:53:25)eklassen Wrote: I am running GS 3.2.3 and the Dynpages doesn't show up in the plugin tab. Any idea why not?

Just to clarify, there's only one php file for this plugin, correct?

No idea.
Yes, it's just one file, dynpages.php.
What if you try uploading another plugin?

All other plugins have worked without flaws, but this one simply doesn't show up. I changed the permissions to 755 as well.
Reply
#52
(2013-08-31, 00:51:40)eklassen Wrote:
(2013-08-31, 00:46:28)Carlos Wrote: What if you try uploading another plugin?

All other plugins have worked without flaws, but this one simply doesn't show up. I changed the permissions to 755 as well.

I'd try uploading some other plugin and see if it shows up.
Reply
#53
Only thing that would cause this is a fatal php error, but youd probably see some other issue.
I have 3.2.3 with dynpages installed just fine. You must have installed it wrong.

getsimple/plugins/dynpages.php
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#54
Hi,

Didn't yet really looked at the code, and DynPages is really a nice and useful plugin (thx mvlcek), but any chance to extend it and bring DynTemplates to use it in the same way but within ... the templates ?
Reply
#55
(2014-10-20, 02:36:38)AndreiCurelaru Wrote: but any chance to extend it and bring DynTemplates to use it in the same way but within ... the templates ?

If you use the I18N plugin, you can include a component in your template with (any number of parameters):
Code:
get_i18n_component('component-name', 'parameter-1', 'parameter-2')

Without the plugin, you can use the core function:
Code:
global $args;
$args = array('parameter-1', 'parameter-2');
get_component('component-name');
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#56
Thanks for answering.

I do indeed use i18n, at least I'm experimenting with it, and thanks for the "without plugin" tip. Meanwhile, what's nice with DynPages it's the shortness and abstraction, on the contrary of the verbose'ness or regular php.

It would be way more concise if we could do as for Pages ans just go :
Code:
{% component param1 param2 %}

It would be just awesome
Reply
#57
In fact, I would like to abstract things, to clean my code out and separate php from the template.

Based on DynPages, into Pages, instead of stuff like :
Code:
<h2><?php get_page_title(); ?></h2>

Actually I'm just using something more Moustache-like or Twig :
Code:
<h2>{{ page title }}</h2>

I would appreciate to use that in the tempaltes too.
Reply
#58
Hi mvlcek,

I am trying to include other php files with this plugin. Not having success. Is it possible to do so. I have tried the regular include method and even tried to pass it into a var and then echo out the var.
Reply
#59
Any reason this plugin wouldn't work on the latest version of GetSimple (3.3.4)? I know on the DynPages plugin page it says it's compatible up to 3.1. Anyway, for what ever reason it's no longer working (as it's compatibility note promised) but if anyone knows of a quickfix, can they post it here please.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#60
Works for me
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#61
Works for me too
Reply
#62
OK, problem resolved. It was a conflict with another plugin someone else installed (Include Page) that uses the exact same "shortcode" format. Eugh.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#63
In my php script (before I started using GetSimple), I would create a download link to a document on my web site by outputting something like this:
<?php
header('Location: http://my.site.com/document.pdf' );
?>
That causes an error when that code is run from a component because the header has already been sent.
How can I do something like that from dynpages? (I guess the question could be: "how can I prevent the headers from being sent automatically before a component starts execution?")

Thanks

Didier

PS: I made another post about dynpages a little while ago as a new thread, not in this thread, sorry about that...)
Reply
#64
use my hook components plugin and use an early hook, like common
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#65
(2015-01-07, 11:42:37)shawn_a Wrote: use my hook components plugin and use an early hook, like common

Will try that, thank you

Didier
Reply
#66
(2015-01-07, 11:42:37)shawn_a Wrote: use my hook components plugin and use an early hook, like common

OK, I installed the hook components plugin.
I renamed my "download" component "hook_download" and changed the reference to {% hook_download %} in the page's source code.
That apparently does the same thing it did before:
"Warning: Cannot modify header information - headers already sent by (..."

Not sure what you mean by "use an early hook, like common"?
I use the FrixelOne theme, if that makes any difference.

For reference, I pass an argument (a file name, via GET or POST) to the hook_download component script, which creates a download link via the php "header()" function so that the download starts immediately when the link is clicked.
Reply
#67
hook_common
look at the hook list in the wiki, also my dev plugin helps you see the hooks and timing of them.

you need to use a hook that occurs before headers are sent of before the page starts to output.

you do not need to call it via {}, it will be called automatically when the common hook is called.

It is also possible that you have a file outputting whitespace and not actual headers. whitespace before or after a php tag in a file will do this.

index-pretemplate is probably better

PHP Code:
<?php
// hook index-pretemplate
global $url;
if(
$url == 'myslug' && isset($_GET['myfile'])){
    
$myfile $_GET['myfile'];
    
// sanitize the shit out of user input!
    
$path 'data/uploads/';
    
header('location: ' .$path.$myfile);
            
}
?>

not sure exactly what you are trying to accomplish, but this seems the wrong way to do this, and very unsafe.

you should also create a new thread for what you are trying to do.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#68
(2015-01-08, 00:00:54)shawn_a Wrote: not sure exactly what you are trying to accomplish, but this seems the wrong way to do this, and very unsafe.

you should also create a new thread for what you are trying to do.

My site has a number of technical documents (mostly pdf files) available for download. Users can browse through folders or search for files and click on a file to download it.

I am open to any alternative way to do it, but I have had that web site (without CMS) for 14 years and so far it has worked well, so other than changing the look of the web site by using GetSimple, I would prefer not to change the apparent functionality (for the users) too much. The underlying technology is fair game however.

The current site (no CMS, no SQL) easily supports over 2TB/month transfers and over a million page views per month, so whatever solution is implemented, it has to present small additional load if possible.

Regarding the thread, I was trying to follow that instruction: POST PLUGIN RELATED QUESTIONS IN THE SUPPORT THREAD FOR THAT PLUGIN

If it is not the desired practice, I'll be glad to do it any other way.

Thank you again
Reply
#69
well this has evolved beyond the dynpages plugin, hence my suggestion.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#70
(2015-01-08, 13:46:26)shawn_a Wrote: well this has evolved beyond the dynpages plugin, hence my suggestion.

I will close my part of this thread here, thank you all for help and suggestions.
Considering the additional complexity of creating a direct download link as I originally wanted, I eventually created an intermediate page that includes one link to the document to be downloaded.
That works much better with the dynpages plugin (it uses it the way it was intended without requiring additional plugins) and looks good.

I really like GetSimple, thank you again for a great tool and great support.
Reply
#71
This was perfect. I had a little snippet of link HTML that I was inserting on various pages, and this plugin made it very easy to pull it out to a component.
Reply
#72
Is there a way to have plugins within components? I use the Google Map plugin, and placed the code within a component. Placing that component on a page, the map plugin code disappears rather than showing the map ...

Component:
<h2>Map</h2>
<p>(%googlemap:MyPlace%)</p>
Reply
#73
You have to use the functions provided by the plugin, not the shortcodes.
That plugin has classes to use for components
http://get-simple.info/forums/showthread...google+map
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#74
Is it possible to use this plugin for rendering a component together with i18n-specialpages? I mean it does work if i use for example (% component %) in the specialpage content. But would want to create a specialpage with new field, type "wysiwyg" and render the component in that field. Is this possible? Not sure if i am explaining well enough Smile
Reply
#75
Is there anyone who would know? or who could help?
Reply




Users browsing this thread: 3 Guest(s)