Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - customizing thread view
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

customizing thread view

 Post Reply Post Reply Page  12>
Author
DoctorB View Drop Down
Newbie
Newbie


Joined: 23 October 2008
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote DoctorB Quote  Post ReplyReply Direct Link To This Post Topic: customizing thread view
    Posted: 30 November 2008 at 1:02pm
We have to run a patient support forum with a structure so that a patient is able to see/access only the thread started by himself and not those by other patients. But the professionals/physicians should be able to see/access all patient threads.

We have built memberships 'patient' and 'professional'. They are non-incrementing.

Any guidance how we can make the above modification would be highly appreciated.

Thank you.
Manish
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2008 at 1:45pm
Would you not be better off using a Support Ticket program rather than a discussion forum?

As Support Ticket software will work exactly how you want without need for alterations.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
DoctorB View Drop Down
Newbie
Newbie


Joined: 23 October 2008
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote DoctorB Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2008 at 1:13pm
That would indeed be ideal but people don't like to login to different applications for different reasons. If they are already visiting the forums, they prefer to post on the forums rather than loggin on to another application for giving free advice.
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2008 at 7:51pm
As I see it, and that is if I even understand what you are trying to put across, is that you would near enough to allocate individual permissions to each patient, so they could only see their own thread. You could either do this by "manually" allocating the individual permissions of each patient, or issuing each and every patient with their own unique password to their own thread, but that would probably be too much to do as each professional would need to have access or know every individual password
Back to Top
DoctorB View Drop Down
Newbie
Newbie


Joined: 23 October 2008
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote DoctorB Quote  Post ReplyReply Direct Link To This Post Posted: 04 December 2008 at 6:19am
Well what I am looking for is something like this:

While displaying threads
      check if the forum-id is equal to the patient forum id
      If yes
           read the username/id from the cookie
           If the user belongs to group 'Patient'
                    fetch from db threads which were started by this user
                    display threads
            End if
     else
           normal webwiz forum code
     end if

Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 04 December 2008 at 6:33am
Okay - we can have a look at this later for you. Right now I'm off to work Dead LOL
Back to Top
DoctorB View Drop Down
Newbie
Newbie


Joined: 23 October 2008
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote DoctorB Quote  Post ReplyReply Direct Link To This Post Posted: 07 January 2009 at 6:50am
I tried to play with the sql on the forum topics page but I am not good at it so getting an error. Can somebody tell me how to do it right?

This is the code that I changed on the fourm topics page:

--------------------------------------

'Select which topics to get

' ** Begin Patient Forum Mod **

If intForumID=40 and intGroupID=15 then
    strSQLFromWhere = strSQLFromWhere & "AND Topic.Start_Thread_ID = lngLoggedInUserID "
End if

' ** End Patient Forum Mod **




strSQLFromWhere = strSQLFromWhere & "AND (" & strDbTable & "Topic.Priority = 3 " & _
        "OR " & strDbTable & "Topic.Moved_ID = " & intForumID & " " & _
        "OR " & strDbTable & "Topic.Forum_ID = " & intForumID & ") " & _
    ") "

'If this isn't a moderator only display hidden posts if the user posted them
If blnModerator = false AND blnAdmin = false Then
    strSQLFromWhere = strSQLFromWhere & "AND (" & strDbTable & "Topic.Hide = " & strDBFalse & " "
    'Don't display hidden posts if guest
    If intGroupID <> 2 Then strSQLFromWhere = strSQLFromWhere & "OR " & strDbTable & "Thread.Author_ID = " & lngLoggedInUserID
    strSQLFromWhere = strSQLFromWhere & ") "
End If
----------------------------------------

What I am trying to do is -

If the forum is 'patient forum' and the user belongs to group 'Patient' then
    modify the query fetching the topics so that it only fetches the topics where the topic_start_id=the id of the logged in patient
end if

Now I get this error when a patient goes to the patient forum:

Server Error in Forum Application
An error has occurred while executing SQL query on database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_topic_count
File Name:- forum_topics.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
The multi-part identifier "Topic.Start_Thread_ID" could not be bound.

------------------------------------------

I know my sql query is defective. I would appreciate your help in correcting it.

Thank you.
Back to Top
DoctorB View Drop Down
Newbie
Newbie


Joined: 23 October 2008
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote DoctorB Quote  Post ReplyReply Direct Link To This Post Posted: 08 January 2009 at 4:39am
Anybody having knowledge of sql?
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.