EasyCFM.COM ColdFusion Forums / Coding Help! / "I can't build a decent Discussion Board blues"

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: "I can't build a decent Discussion Board blues" -- page: 1 2 3

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

dk
03-02-2004 @ 8:50 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 48
Joined: Jan 2004

You do not need to use cflock with client variables. Client variables are exclusive to the client.

Webmaster
03-02-2004 @ 9:02 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

This:

<CFAPPLICATION NAME="kforum"
    CLIENTMANAGEMENT="Yes"
     clientstorage="fgkc_com"  
    SETCLIENTCOOKIES="Yes"  >


Has to go in your APPLICATION.CFM file BEFORE this:
<cflock scope="application" type="readonly" timeout="15">
<CFPARAM NAME="action" DEFAULT="">
<CFPARAM NAME="Client.UserName" DEFAULT="Guest">
<CFPARAM NAME="Client.LoggedIn" DEFAULT="False">
<CFPARAM NAME="Client.AdminLoggedIn" DEFAULT="False">
<CFPARAM NAME="postid" DEFAULT="0">
<CFPARAM NAME="cookie.username" DEFAULT="">
<CFPARAM NAME="startrow" DEFAULT="1">
</cflock>

Remember that the Application.cfm will EXECUTE FIRST before any .CFM file is called.. so if you are cflocking or reading/writing an Application scoped variable.. the <CFApplication> tag has to preceed it.

So by general (Good Practice) I do this:

<!--- Application.cfm begins --->
<CFAPPLICATION NAME="kforum"
    CLIENTMANAGEMENT="Yes"
     clientstorage="fgkc_com"  
    SETCLIENTCOOKIES="Yes"  >

<!--- rest of your code then starts here --->


Thanks,
Pablo Varando
Team Macromedia Member
=====================================================

cpink
03-02-2004 @ 11:39 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 21
Joined: Feb 2004

Okay I am hoping that I have it this time but now my variables are coming up undefined.  When will this work for me. Here is my Application.cfm code:


<CFAPPLICATION NAME="kForum"
    CLIENTMANAGEMENT="Yes"
    CLIENTSTORAGE="fgkc_com"
    SETCLIENTCOOKIES="Yes" >





<CFSET Admin.Username="Administrator">
<CFSET Admin.Password="pass">
<CFSET Forum.Name="Kingdom Forum">
<CFSET Forum.URL="http://www.fgkc.com/message/index.cfm">
<CFSET Website.Title="Full Gospel Kingdom Church">
<CFSET Website.URL="http://www.fgkc.com">
<CFSET Database.DSN="fgkc_com">
<CFSET GuestLoginAllowed="False">
<CFSET Color1="FBBF32">
<CFSET Color2="A73322">
<CFSET BGColor="DF7100">
<CFPARAM NAME="recordsshown" DEFAULT="25">




<CFPARAM NAME="action" DEFAULT="">
<CFPARAM NAME="Client.UserName" DEFAULT="Guest">
<CFPARAM NAME="Client.LoggedIn" DEFAULT="False">
<CFPARAM NAME="Client.AdminLoggedIn" DEFAULT="False">
<CFPARAM NAME="postid" DEFAULT="0">
<CFPARAM NAME="cookie.username" DEFAULT="">
<CFPARAM NAME="startrow" DEFAULT="1">

________________________________________________________

This is the error I am getting now........
Element URL is undefined in WEBSITE.  

  
The error occurred in /home/felton/fgkc-www/message/header.cfm: line 169

167 : <A HREF="viewposts.cfm"><FONT COLOR="#FFFFFF">Post a New Topic</FONT></A>|
168 : <A HREF="viewposts.cfm"><FONT COLOR="#FFFFFF">View the Posted Topics</FONT></A> |
169 : <A HREF="<CFOUTPUT>#Website.URL#</CFOUTPUT>"><FONT COLOR="#FFFFFF">Back to <CFOUTPUT>#Website.Title#</CFOUTPUT></FONT></A> |
170 : <CFIF Client.LoggedIn EQ "False">
171 : <A HREF="login.cfm"><FONT COLOR="#FFFFFF">Log In</FONT></A>




Kindest Regards, CPINK

lisa
03-17-2009 @ 4:30 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 1
Joined: Mar 2009

I have meet your accident
i just put this code
<cfset THIS.clientmanagement="yes">
in the "application.cfc"
then,the error is disapear.
you can try it.

and it has another method to correct it.
check your settings in CF Admin -> Server Settings -> Client Variables

PAGE: 1 2 3

Website Designed and Developed by Pablo Varando.