Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dummy PHP file, for offline web page testing / creation.
#1
First off, hello all!

http://internetimagery.com/downloads/dummy.zip <-- File is here, to skip text and download script.

I'll just come out and say it off the bat. I love this CMS. While I haven't made much and I'm totally new to web design (extremely new), this is the one I have seen to resonate with me the easiest.

I have learnt the basics using Dream Weaver, and love the fact that I can simply pop in the few tags this CMS has into a static page, and out comes a website. Even more so, I love how easy it is to add multiple templates to a single web page, and dynamic content with the "dynpages" plugin.

With this development process in mind, I had trouble previewing web page components offline, and didn't like the idea of editing templates with tags at the last moment. So I figured it was necessary to make a script that emulates user input simply, using the same template tags.

I did a quick search and couldn't see a script like this already existing, so apologies if it has already been done (and please point me in its direction if it is more comprehensive or accurate).

YOU CAN DOWNLOAD DUMMY.PHP HERE.
http://internetimagery.com/downloads/dummy.zip

The idea with this script is that you place an "include(dummy.php)" line at the top of your template page while working on it. Throw the script into the same folder, and like magic all your template tags suddenly work.

Now you can mess around with things and see the result as though it had been uploaded, and when you do finally upload your template to your CMS site, all you need to do is remove the "include("dummp.php")" line and it will work.

Everything (with the exception of navigation tags) is independent. So if you wanted to keep a few template tags displaying dummy info you could (NOTE: I haven't tested this, and it may just cause conflict issues).

dummy.php is not intended to be used with the CMS or put into the themes folder therein. It's just to emulate the functions the CMS provides in order to "try out" your static web page in some other folder.

The file is commented with info from the wiki, so it can also act as a bit of a cheat sheet for copy/paste.

Erm... Thats it really. I hope this is helpful for someone other than just me. If so, I'm happy I can give something back to this awesome project.

Let me know what you think, and send me an email (it's in the file) if you spot any problems or have any improvement ideas.
Reply
#2
You're right, this is a great idea for theme development. I see room for improvement in your script but it's a good start.

For starters, I notice with the "lorem ipsum" in some cases is missing opening and closing <p> tags. Also, to keep the script a little DRY-er you could chuck the "lorem ipsum" in a global variable or something similar.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#3
Welcome to GetSimple!

For me, your idea sounds appealing, too! So I pondered about situations and demands and here they are:

I can think of some more attributes / features:

1)
each dummy text could note which part of the template it substitutes (for example "get_site_credits()")

2)
I wouldn't use static version numbers, I am sure (even when I do not know in the moment which one) that there is a GetSimple-variable for that

3)
I would love to see some Umlauts etc. in the dummy-text, for non-english developers it is crucial to test UTF-8-support, so I can imagine a german, a turk, a farsi-version of dummy-text etc.

4)
the entered meta-keywords "get_page_meta_keywords()" maybe are a little too un-abstract ;=)

5)
It is not quite clear where to place the dummy-script.
In the script is written:
Quote:THEN SIMPLY PUT THIS FILE IN THE SAME FOLDER AS YOUR WEB PAGE

but above you write:
Quote:The idea with this script is that you place an "include(dummy.php)" line at the top of your template page while working on it. Throw the script into the same folder,

so: does it belong into the theme-folder or into the main-folder of GetSimple?
If it does belong into the main-folder, I would suggest to rename it to be more specific, for example:
"themedevelopmentdummy.php"

I am really curious to test your script, whenever I will start the next theme-development (or modification) I will use it in that process

Thank you for your idea! I suggest you will place it into the EXTEND, and open a support thread!

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#4
Quote:You're right, this is a great idea for theme development. I see room for improvement in your script but it's a good start.
For starters, I notice with the "lorem ipsum" in some cases is missing opening and closing <p> tags. Also, to keep the script a little DRY-er you could chuck the "lorem ipsum" in a global variable or something similar.

Missing tags? Whoops... haha. I'll check that out.
Yeah I suppose that is a good idea to add all the filler text into one area. I originally did that, then decided it would be nice to have each part independent incase someone wants to just copy out the section of script for their own purposes.

I'll probably do it anyway. Clean code is always better. Even moreso for me as I'm very much an beginner programmer (been doing it for all of a week and a half, heh).

Connie Wrote:Welcome to GetSimple!

For me, your idea sounds appealing, too! So I pondered about situations and demands and here they are:

I can think of some more attributes / features:

1)
each dummy text could note which part of the template it substitutes (for example "get_site_credits()")

2)
I wouldn't use static version numbers, I am sure (even when I do not know in the moment which one) that there is a GetSimple-variable for that

3)
I would love to see some Umlauts etc. in the dummy-text, for non-english developers it is crucial to test UTF-8-support, so I can imagine a german, a turk, a farsi-version of dummy-text etc.

4)
the entered meta-keywords "get_page_meta_keywords()" maybe are a little too un-abstract ;=)

5)
It is not quite clear where to place the dummy-script.
In the script is written:
Quote:THEN SIMPLY PUT THIS FILE IN THE SAME FOLDER AS YOUR WEB PAGE

but above you write:
Quote:The idea with this script is that you place an "include(dummy.php)" line at the top of your template page while working on it. Throw the script into the same folder,

so: does it belong into the theme-folder or into the main-folder of GetSimple?
If it does belong into the main-folder, I would suggest to rename it to be more specific, for example:
"themedevelopmentdummy.php"

I am really curious to test your script, whenever I will start the next theme-development (or modification) I will use it in that process

Alright, here we go...

1) Not sure what you mean, other than to print out which script it is, within the script (so it shows up on the web page)? I probably won't do that simply because the idea is that this works in the background. I want it to make the web page functional with filler text, and having code pieces floating around could detract from the look of a finished page.
Also if you're putting in php tags yourself, you should already know where they are in the code.

2) The version number is really just a place holder (as is everything in the script, which is the idea). I wouldn't use a variable to connect with GetSimpleCMS, because this is supposed to be used in situations where the CMS is absent.

3) Err, I don't follow what I should put in the text? I would love to make it multi-lingual. No idea how to do that! Help me!!

4) Haha. It's all just filler. That stuff is really only to fill the space offline, like all the stuff in the script. Of course if people are offended or some such, I'll change them. Tongue

5) So this script is for working offline without GetSimpleCMS. It is not intended to actually be used with the CMS directly. You make your template web page in whatever program you feel like making it in. But instead of filling in text and things yourself to test how a page will work when put inside the CMS themes folder, you can add the actual CMS tags to the page.
Within the web page "template.php" (or whatever you call it), and above the <html> tag, you insert <?php include("dummy.php") ?> which links to the dummy file. The file essentially pretends to be the CMS and fills in all the php tags used.
dummy.php therefore needs to be in the same folder as your template.php.

dummy.php is not intended to be used with the CMS or put into the themes folder therein. It's just to emulate the functions the CMS provides in order to "try out" your web page.
I hope that makes sense... makes sense in my head. Haha.

Quote:Thank you for your idea! I suggest you will place it into the EXTEND, and open a support thread!

How do I go about this?
Reply
#5
1)
you didn't get my idea. When you use filler text and want to test in the template, it is a good help to see: "This is the content filler text" or "this sis supposed to be the footer text" to identify it ....

3)
just some umlauts, ÜÖÄ etc.

"This is a filler text with some special content":
in german: "Dies ist ein Fülltext mit besonderem unnützen Inhalten"
in french: "Ceci est un texte de remplissage avec du contenu spécial"
in arab: "هذا هو نص حشو مع بعض المحتويات الخاصة"
in armenian: "Սա FILLER տեքստային որոշ հատուկ բովանդակությամբ"
in simplified chinese: "一些特殊的内容,这是一个填充文本"

5) that was my error. I thought it should be used with GS
so I also thought why not just write one example page in GS?

Quote:dummy.php is not intended to be used with the CMS or put into the themes folder therein. It's just to emulate the functions the CMS provides in order to "try out" your web page.

please make that clearer ;=)

but if it should be used without GS, I see no use for me, as I always test locally, because I also test plugins etc., not only themes

cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#6
@Connie, A way to make changes to your theme online and test them, before releasing them to the public, is
  1. install Theme Switcher
  2. copy your theme, e.g. "Cardinal" to "Cardinal1"
  3. update theme "Cardinal1"
  4. test your site by calling http://yoursite/?settheme&theme=Cardinal1, and if your site needs further changes, goto 3
  5. otherwise set your theme to "Cardinal1" in the GS administration
  6. (copy "Cardinal1" back to "Cardinal" and next time edit "Cardinal")
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#7
Connie Wrote:1)
you didn't get my idea. When you use filler text and want to test in the template, it is a good help to see: "This is the content filler text" or "this sis supposed to be the footer text" to identify it ....

3)
just some umlauts, ÜÖÄ etc.

"This is a filler text with some special content":
in german: "Dies ist ein Fülltext mit besonderem unnützen Inhalten"
in french: "Ceci est un texte de remplissage avec du contenu spécial"
in arab: "هذا هو نص حشو مع بعض المحتويات الخاصة"
in armenian: "Սա FILLER տեքստային որոշ հատուկ բովանդակությամբ"
in simplified chinese: "一些特殊的内容,这是一个填充文本"

5) that was my error. I thought it should be used with GS
so I also thought why not just write one example page in GS?

Quote:dummy.php is not intended to be used with the CMS or put into the themes folder therein. It's just to emulate the functions the CMS provides in order to "try out" your web page.

please make that clearer ;=)

but if it should be used without GS, I see no use for me, as I always test locally, because I also test plugins etc., not only themes

cheers, Connie

Hmm... that is a point. There is no way to emulate plugins. Ah well this is simply a small easy way to populate single static pages outside GetSimpleCMS. I think you're probably right. Having messages signifying what a section is can't hurt.

Quote:please make that clearer ;=)

Haha. Smile
Yeah alright, my fault. I'll add that line to the first post.

I suppose you could try putting it with your template in the template folder and see what happens. Ultimately I imagine it'll be a tug of war between the script and the CMS, as they both use the same functions.
Reply




Users browsing this thread: 1 Guest(s)