Access data base entries from two Serendipity directories
Access data base entries from two Serendipity directories
Could I create another separate directory (say "www.wandrin.us/blogtest") on my server with Serendipity and then access the same data base that is currently accessed from my current www.wandrin.us/blog. This separate "blogtest" directory would be for my use only testing and changing the look and presentation of the entries.
It would be my hope that this separate directory would not be visible to anyone other than me. However, I suppose the web crawlers could probably find it. Since it would be visible, I would disallow comments from that separate configuration.
Is this possible or is there another way to create a testing environment without creating a separate "test" data base?
It would be my hope that this separate directory would not be visible to anyone other than me. However, I suppose the web crawlers could probably find it. Since it would be visible, I would disallow comments from that separate configuration.
Is this possible or is there another way to create a testing environment without creating a separate "test" data base?
Just use the Expert Installation and change the database prefix. Then you can have the tables for two (or more) separate blogs in one database, because they'll have different names. I do this myself for my sandbox!
Incidentally, web crawlers won't be able to find your test blog unless you tell them where it is. They just follow links around, so as long as you don't put any links to your test blog online, they'll never find it. They haven't found mine yet.
Incidentally, web crawlers won't be able to find your test blog unless you tell them where it is. They just follow links around, so as long as you don't put any links to your test blog online, they'll never find it. They haven't found mine yet.
"Expert Installation"
This should be cause for concern when I do this.
Since I only want to test changes to the presentation and look of displayed blog entries, rather than a new Serendipity installation, could this work?
(1) Create a separate "test" directory on the server.
(2) Copy the contents from current blog directory to that new "test" directory.
When doing this, the configuration of the test directory should be pointing to the data base.
Keep the balance...
Lloyd
http://www.wandrin.us/blog
Since I only want to test changes to the presentation and look of displayed blog entries, rather than a new Serendipity installation, could this work?
(1) Create a separate "test" directory on the server.
(2) Copy the contents from current blog directory to that new "test" directory.
When doing this, the configuration of the test directory should be pointing to the data base.
Keep the balance...
Lloyd
http://www.wandrin.us/blog
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
If you do that, changing the style of your test blog would also change the style for your live blog. So you NEED two distinct installations if you want to test changes.
Regards,
Garvin
If you do that, changing the style of your test blog would also change the style for your live blog. So you NEED two distinct installations if you want to test changes.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I believe I am beginning to understand how this all works.... Or maybe not.
It appears that Serendipity keeps configuration parameters in the data base. I had made the assumption that the parameters and templates to be used would be stored in the directory with the Serendipity code.
Rats. So it looks like it is back to the "Expert Installation". That still scares me.
Now that I am headed there and download the Serendipity software to that "test" directory, must the release level of Serendipity be the same for both directory locations?
It appears that Serendipity keeps configuration parameters in the data base. I had made the assumption that the parameters and templates to be used would be stored in the directory with the Serendipity code.
Rats. So it looks like it is back to the "Expert Installation". That still scares me.
Now that I am headed there and download the Serendipity software to that "test" directory, must the release level of Serendipity be the same for both directory locations?
Serendipity keeps almost everything in database. The directory contains mostly the application code and static resources. The only things saved by serendipity in the directory are (apart from cached compiled templates and dynamically downloaded plugins/templates):
- the .inc.php file with the info how to access this database (saved once during setup)
- .htaccess tuning rewrite rules (also usually left unchanged after setup)
- uploaded media (images and such)
Everything else - from accounts and articles to info which plugins and themes are active and how are they configured - is in the database.
PS There is nothing particularly difficult in expert install. Simply, the screen is longer so it takes more time to review it.
- the .inc.php file with the info how to access this database (saved once during setup)
- .htaccess tuning rewrite rules (also usually left unchanged after setup)
- uploaded media (images and such)
Everything else - from accounts and articles to info which plugins and themes are active and how are they configured - is in the database.
PS There is nothing particularly difficult in expert install. Simply, the screen is longer so it takes more time to review it.
Okay. In spite of my fears, I was able to install a second Serendipity to share the data base. I made the database prefix "tb_" to avoid any conflict with the Serendipity parameters from the real blog. Of course, that negates my accessing those entries from this test blog.
I was hoping to be able to see those entries from the real blog rather than making test entries for this test blog. Unless I've made some parameter error in the configuration, that doesn't appear to be possible.
C'est la vie...
I was hoping to be able to see those entries from the real blog rather than making test entries for this test blog. Unless I've made some parameter error in the configuration, that doesn't appear to be possible.
C'est la vie...
That SQL code would essentially double the size of the data base.
I suppose there is someway via an SQL command to select based on dates as well. Then after it is all done, is there a "delete" SQL command to remove all these entries from the "tb_" data base.
Then there is the decision where would this one time programmer (early last century) put that SQL command to make that all happen. This is turning out to be much more difficult and involved than I had hoped.
Perhaps I need to spend some time at my favorite computer reference library -- Barnes and Noble.
Later -- editing original post.
Found phpMyAdmin. It seems to do lots of SQL processes to the data base -- at least that is what the overview indicates. Could this be the shortcut for this neophyte. Or is that another whole learning curve.
I suppose there is someway via an SQL command to select based on dates as well. Then after it is all done, is there a "delete" SQL command to remove all these entries from the "tb_" data base.
Then there is the decision where would this one time programmer (early last century) put that SQL command to make that all happen. This is turning out to be much more difficult and involved than I had hoped.
Perhaps I need to spend some time at my favorite computer reference library -- Barnes and Noble.
Later -- editing original post.
Found phpMyAdmin. It seems to do lots of SQL processes to the data base -- at least that is what the overview indicates. Could this be the shortcut for this neophyte. Or is that another whole learning curve.
I'm glad you found the Expert Installation easy enough to complete!
phpMyAdmin presents an easy-to-understand interface to the database. From it, you can perform simple database tasks with a few mouse clicks. You can also enter SQL to be evaluated.
Most hosting companies that provide MySQL also provide phpMyAdmin.
Providing a sandbox along with the actual blog is an interesting idea, and may be worth further investigation. The problem is determining the sandbox capabilities. You don't want to modify (or copy) the actual entries; that leaves configuration, plugins, and templates. I think modifying the sandbox configuration would be quite difficult, and modifying the plugins a little less difficult (although I could be wrong there).
That leaves templates. We can already switch templates based on category, so it should be no big deal to create a Template Sandbox plugin that would switch templates on a particular page access, like /serendipity/index.php?plugin=serendipity_event_template_sandbox or something.
phpMyAdmin presents an easy-to-understand interface to the database. From it, you can perform simple database tasks with a few mouse clicks. You can also enter SQL to be evaluated.
Most hosting companies that provide MySQL also provide phpMyAdmin.
Providing a sandbox along with the actual blog is an interesting idea, and may be worth further investigation. The problem is determining the sandbox capabilities. You don't want to modify (or copy) the actual entries; that leaves configuration, plugins, and templates. I think modifying the sandbox configuration would be quite difficult, and modifying the plugins a little less difficult (although I could be wrong there).
That leaves templates. We can already switch templates based on category, so it should be no big deal to create a Template Sandbox plugin that would switch templates on a particular page access, like /serendipity/index.php?plugin=serendipity_event_template_sandbox or something.
Thanks to all of you -- Judebert, Mekk, Garvin...
Right now I am trying to decide which way to go on this whole effort.
The learning curve to understand making (major or minor) mods to plug-ins or php code is more than I want to tackle in this phase of life -- retirement.
It appears that I will take the easy way out. I will create entries for my test (sandbox) system. With that I will be able to see what things kind of look like. Once that is done, I can create/move any modified code (if I've made any) and templates and plugins to the visible blog.
Once again, thanks to all for the education and the encouragement.
Right now I am trying to decide which way to go on this whole effort.
The learning curve to understand making (major or minor) mods to plug-ins or php code is more than I want to tackle in this phase of life -- retirement.
It appears that I will take the easy way out. I will create entries for my test (sandbox) system. With that I will be able to see what things kind of look like. Once that is done, I can create/move any modified code (if I've made any) and templates and plugins to the visible blog.
Once again, thanks to all for the education and the encouragement.