The 3.5 version of BlogCFC is now ready for testing. This is NOT the final version nor do I recommend you going live with it. It has been tested for a whole twenty minutes or so and the documentation has not been updated. Follow the more link below for a quick description of how to use new features. This release adds multiple blogs/users per DSN. You can download it here.
Please see the include blog.ini file for examples. To use multiple blogs per dsn, simply use the same dsn setting. To use multiple users per blog, simply insert extra values into the user table. However, if you have multiple blogs per DSN and want user A to only have access to blog A, you must use the "users=" property in the ini file. If this is left blank (and Default's entry is blank), then all users will be allowed to use the blog.
Archived Comments
this is great!
The Access databases included with the download do not have the correct schema. I created an Access DB based on the schema contained in "mysql.sql" and everything worked fine.
Thanks for your continued contributions, Ray.
Ooops - I knew that - and coulda _sworn_ I blogged it, but I forgot. It will be ready for final of course.
I can't figure out how to set this up, can you help?
I set up the Access db fine. I moved the org folder into the client folder as it says to do but I then moved everything from client up into "blog" and changed the default in the ini to:
blogDBType=MSACCESS (Correct?)
blogURL=http://root/blog/index.cfm
I got error: Could not find the included template /blogdev/tags/scopecache.cfm
OK, I then saw that I missed that bit about the application file change. Set application.root to "blog" and now I get 1/2 a page then the following error:
************
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 4.
The error occurred in F:\blog\org\camden\blog\blog.cfc: line 646
Called from F:\blog\includes\pods\recent.cfm: line 17
Called from F:\blog\tags\layout.cfm: line 60
Called from F:\blog\index.cfm: line 160
Called from F:\blog\org\camden\blog\blog.cfc: line 646
Called from F:\blog\includes\pods\recent.cfm: line 17
Called from F:\blog\tags\layout.cfm: line 60
Called from F:\blog\index.cfm: line 160
644 :
645 : order by tblblogentries.#arguments.params.orderBy# #arguments.params.orderByDir#
646 : <cfif structKeyExists(arguments.params,"maxEntries") and instance.blogDBType is "MYSQL">limit #arguments.params.maxEntries#</cfif>
647 : </cfquery>
648 :
******************
Does it think I'm using mysql? What to do?
Thanks.
stylo - are you using the default blog? It looks like your code may be using the wrong blog in the ini file.
BTW, regarding the css file:
-I saw there's a js comment in the css file. Need to change to a css comment.
-Trebuchet MS should be in quotes.
>>are you using the default blog
I guess so. How would I know? I didn't do anything other than what I noted above.
Stylo, look in the application file. Look for the line that says, change this if you dont want the default blog. What is the value of the variable? Then look for that in the ini file and make sure you are using the right dbtype there.
Also... heh ... what IS a proper CSS comment?
seems right:
appl. file: blogname = "Default"
[default]
blogDBType=MSACCESS
******
css comment is the multiline js comment: /* note */
Sorry for the multiple posts here, but is it maybe the post above:
"The Access databases included with the download do not have the correct schema. I created an Access DB based on the schema contained in "mysql.sql" and everything worked fine."
Do I have to change the db somehow?
Absolutely. The Access db in the install folder isn't proper.
Well, I looked at the names in the mysql.sql as noted above, and seems they match the Access names used, so I guess I'll just wait for the final release. Thanks for your help.
Oh, I see, tblblogentries is missing a few...
Here's the apache rewrite code if anyone wants it as well. Create (or modify) an .htaccess file in your root directory:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/go/([aA-zZ]*)
RewriteRule ^(.*) /index.cfm?mode=alias&alias=%1 [L]
If you only want numeric aliases pop [0-9] where [aA-zZ] is.
<more> doesn't appear to be working? I've altered the way it displays the body but that shouldn't affect it should it?
Isn't more something that should get sorted when the entry goes to the DB?
So as not to lose the HTML in the comment post, I'll will use X for both the less than and greater than sign, ok? You simply forgot the last slash. You need to use Xmore/X for it to work right.
Ahh, cool, did the trick. FYI- Just checked in the documentation (with 3.5 zip) and it only says use (using X) XmoreX not Xmore/X.