Vanilla already lists all queries which create the page. Look on the roles and settings page for your role and tick 'can view debug info' and at the bottom of the page you'll get something like this: select c.CategoryID as CategoryID, c.Name as Name, c.Description as Description, coalesce(b.Blocked, 0) as Blocked from LUM_Category c left join LUM_CategoryRoleBlock crb on c.CategoryID = crb.CategoryID and crb.RoleID = 6 left join LUM_CategoryBlock b on c.CategoryID = b.CategoryID and b.UserID = 229 where (crb.Blocked = '0' or crb.Blocked = 0 or crb.Blocked is null ) group by c.CategoryID, c.Name, c.Description order by b.Blocked asc, c.Priority asc
select us.SearchID as SearchID, us.Label as Label, us.UserID as UserID, us.Type as Type, us.Keywords as Keywords from LUM_UserSearch us where us.UserID = '229' limit 0, 10
select t.DiscussionID as DiscussionID, t.FirstCommentID as FirstCommentID, t.AuthUserID as AuthUserID, t.WhisperUserID as WhisperUserID, t.Active as Active, t.Closed as Closed, t.Sticky as Sticky, t.Sink as Sink, t.Name as Name, t.DateCreated as DateCreated, t.LastUserID as LastUserID, t.DateLastActive as DateLastActive, t.CountComments as CountComments, t.CategoryID as CategoryID, u.Name as AuthUsername, lu.Name as LastUsername, wt.Name as WhisperUsername, tuwf.LastUserID as WhisperFromLastUserID, tuwf.DateLastActive as WhisperFromDateLastActive, tuwf.CountWhispers as CountWhispersFrom, tuwt.LastUserID as WhisperToLastUserID, tuwt.DateLastActive as WhisperToDateLastActive, tuwt.CountWhispers as CountWhispersTo, wluf.Name as WhisperFromLastUsername, wlut.Name as WhisperToLastUsername, c.Name as Category, b.DiscussionID is not null as Bookmarked, utw.LastViewed as LastViewed, coalesce(utw.CountComments, 0) as LastViewCountComments, ao.AddOnID as AddOnID from LUM_Discussion t left join LUM_User u on t.AuthUserID = u.UserID left join LUM_User lu on t.LastUserID = lu.UserID left join LUM_User wt on t.WhisperUserID = wt.UserID left join LUM_DiscussionUserWhisperFrom tuwf on t.DiscussionID = tuwf.DiscussionID and tuwf.WhisperFromUserID = 229 left join LUM_User wluf on tuwf.LastUserID = wluf.UserID left join LUM_DiscussionUserWhisperTo tuwt on t.DiscussionID = tuwt.DiscussionID and tuwt.WhisperToUserID = 229 left join LUM_User wlut on tuwt.LastUserID = wlut.UserID left join LUM_Category c on t.CategoryID = c.CategoryID left join LUM_CategoryRoleBlock crb on t.CategoryID = crb.CategoryID and crb.RoleID = 6 left join LUM_UserBookmark b on t.DiscussionID = b.DiscussionID and b.UserID = 229 left join LUM_UserDiscussionWatch utw on t.DiscussionID = utw.DiscussionID and utw.UserID = 229 left join LUM_AddOn ao on t.DiscussionID = ao.DiscussionID where (crb.Blocked = '0' or crb.Blocked = 0 or crb.Blocked is null ) and t.DiscussionID = '5338' and (t.WhisperUserID = '229' or t.WhisperUserID = 229 or t.AuthUserID = '229' or t.AuthUserID = 229 or t.WhisperUserID is null or t.WhisperUserID = 0 or t.WhisperUserID = '0' ) group by t.DiscussionID
update LUM_UserDiscussionWatch set CountComments='21', LastViewed='2007-03-02 13:54:47' where UserID = '229' and DiscussionID = '5338'
select count(m.CommentID) as Count from LUM_Comment m inner join LUM_Discussion t on m.DiscussionID = t.DiscussionID where (m.Deleted = '0' or m.Deleted = 0 ) and (m.WhisperUserID = '229' or m.WhisperUserID is null or m.WhisperUserID = 0 or m.WhisperUserID = '0' or m.AuthUserID = '229' ) and m.DiscussionID = '5338'
select coalesce(ab.Blocked, 0) as AuthBlocked, coalesce(cb.Blocked, 0) as CommentBlocked, m.CommentID as CommentID, m.DiscussionID as DiscussionID, m.Body as Body, m.FormatType as FormatType, m.DateCreated as DateCreated, m.DateEdited as DateEdited, m.DateDeleted as DateDeleted, m.Deleted as Deleted, m.AuthUserID as AuthUserID, m.EditUserID as EditUserID, m.DeleteUserID as DeleteUserID, m.WhisperUserID as WhisperUserID, m.RemoteIp as RemoteIp, a.Name as AuthUsername, a.Icon as AuthIcon, r.Name as AuthRole, r.RoleID as AuthRoleID, r.Description as AuthRoleDesc, r.Icon as AuthRoleIcon, r.PERMISSION_HTML_ALLOWED as AuthCanPostHtml, e.Name as EditUsername, d.Name as DeleteUsername, t.WhisperUserID as DiscussionWhisperUserID, w.Name as WhisperUsername from LUM_Comment m inner join LUM_User a on m.AuthUserID = a.UserID left join LUM_Role r on a.RoleID = r.RoleID left join LUM_User e on m.EditUserID = e.UserID left join LUM_User d on m.DeleteUserID = d.UserID inner join LUM_Discussion t on m.DiscussionID = t.DiscussionID left join LUM_User w on m.WhisperUserID = w.UserID left join LUM_CategoryRoleBlock crb on t.CategoryID = crb.CategoryID and crb.RoleID = 6 left join LUM_UserBlock ab on m.AuthUserID = ab.BlockedUserID and ab.BlockingUserID = 229 left join LUM_CommentBlock cb on m.CommentID = cb.BlockedCommentID and cb.BlockingUserID = 229 where (crb.Blocked = '0' or crb.Blocked = 0 or crb.Blocked is null ) and (m.Deleted = '0' or m.Deleted = 0 ) and (m.WhisperUserID = '229' or m.WhisperUserID is null or m.WhisperUserID = 0 or m.WhisperUserID = '0' or m.AuthUserID = '229' ) and m.DiscussionID = '5338' order by m.DateCreated asc limit 0, 50
Errr. i'm really not sure. It's displaying that on every page for me on here and as far as I'm aware the only thing that makes it come and go is ticking and unticking that box on my role permissions page. I dunno if Mark has done something extra somewhere though..
I don't where you can properly set the debug mode on, but you can by adding $Context->Mode = MODE_DEBUG; just after Context is set (line 47 for init_vanilla).
Good god, I've been searching for a way to turn on debug mode for Vanilla 1.1.10 for literally hours. There's a permission to view debug info in the Roles and Permissions, but this is the only way I've seen (and the only reference to it on the entire internet) to actually turn it on.
Comments
select c.CategoryID as CategoryID, c.Name as Name, c.Description as Description, coalesce(b.Blocked, 0) as Blocked from LUM_Category c left join LUM_CategoryRoleBlock crb on c.CategoryID = crb.CategoryID and crb.RoleID = 6 left join LUM_CategoryBlock b on c.CategoryID = b.CategoryID and b.UserID = 229 where (crb.Blocked = '0' or crb.Blocked = 0 or crb.Blocked is null ) group by c.CategoryID, c.Name, c.Description order by b.Blocked asc, c.Priority asc select us.SearchID as SearchID, us.Label as Label, us.UserID as UserID, us.Type as Type, us.Keywords as Keywords from LUM_UserSearch us where us.UserID = '229' limit 0, 10 select t.DiscussionID as DiscussionID, t.FirstCommentID as FirstCommentID, t.AuthUserID as AuthUserID, t.WhisperUserID as WhisperUserID, t.Active as Active, t.Closed as Closed, t.Sticky as Sticky, t.Sink as Sink, t.Name as Name, t.DateCreated as DateCreated, t.LastUserID as LastUserID, t.DateLastActive as DateLastActive, t.CountComments as CountComments, t.CategoryID as CategoryID, u.Name as AuthUsername, lu.Name as LastUsername, wt.Name as WhisperUsername, tuwf.LastUserID as WhisperFromLastUserID, tuwf.DateLastActive as WhisperFromDateLastActive, tuwf.CountWhispers as CountWhispersFrom, tuwt.LastUserID as WhisperToLastUserID, tuwt.DateLastActive as WhisperToDateLastActive, tuwt.CountWhispers as CountWhispersTo, wluf.Name as WhisperFromLastUsername, wlut.Name as WhisperToLastUsername, c.Name as Category, b.DiscussionID is not null as Bookmarked, utw.LastViewed as LastViewed, coalesce(utw.CountComments, 0) as LastViewCountComments, ao.AddOnID as AddOnID from LUM_Discussion t left join LUM_User u on t.AuthUserID = u.UserID left join LUM_User lu on t.LastUserID = lu.UserID left join LUM_User wt on t.WhisperUserID = wt.UserID left join LUM_DiscussionUserWhisperFrom tuwf on t.DiscussionID = tuwf.DiscussionID and tuwf.WhisperFromUserID = 229 left join LUM_User wluf on tuwf.LastUserID = wluf.UserID left join LUM_DiscussionUserWhisperTo tuwt on t.DiscussionID = tuwt.DiscussionID and tuwt.WhisperToUserID = 229 left join LUM_User wlut on tuwt.LastUserID = wlut.UserID left join LUM_Category c on t.CategoryID = c.CategoryID left join LUM_CategoryRoleBlock crb on t.CategoryID = crb.CategoryID and crb.RoleID = 6 left join LUM_UserBookmark b on t.DiscussionID = b.DiscussionID and b.UserID = 229 left join LUM_UserDiscussionWatch utw on t.DiscussionID = utw.DiscussionID and utw.UserID = 229 left join LUM_AddOn ao on t.DiscussionID = ao.DiscussionID where (crb.Blocked = '0' or crb.Blocked = 0 or crb.Blocked is null ) and t.DiscussionID = '5338' and (t.WhisperUserID = '229' or t.WhisperUserID = 229 or t.AuthUserID = '229' or t.AuthUserID = 229 or t.WhisperUserID is null or t.WhisperUserID = 0 or t.WhisperUserID = '0' ) group by t.DiscussionID update LUM_UserDiscussionWatch set CountComments='21', LastViewed='2007-03-02 13:54:47' where UserID = '229' and DiscussionID = '5338' select count(m.CommentID) as Count from LUM_Comment m inner join LUM_Discussion t on m.DiscussionID = t.DiscussionID where (m.Deleted = '0' or m.Deleted = 0 ) and (m.WhisperUserID = '229' or m.WhisperUserID is null or m.WhisperUserID = 0 or m.WhisperUserID = '0' or m.AuthUserID = '229' ) and m.DiscussionID = '5338' select coalesce(ab.Blocked, 0) as AuthBlocked, coalesce(cb.Blocked, 0) as CommentBlocked, m.CommentID as CommentID, m.DiscussionID as DiscussionID, m.Body as Body, m.FormatType as FormatType, m.DateCreated as DateCreated, m.DateEdited as DateEdited, m.DateDeleted as DateDeleted, m.Deleted as Deleted, m.AuthUserID as AuthUserID, m.EditUserID as EditUserID, m.DeleteUserID as DeleteUserID, m.WhisperUserID as WhisperUserID, m.RemoteIp as RemoteIp, a.Name as AuthUsername, a.Icon as AuthIcon, r.Name as AuthRole, r.RoleID as AuthRoleID, r.Description as AuthRoleDesc, r.Icon as AuthRoleIcon, r.PERMISSION_HTML_ALLOWED as AuthCanPostHtml, e.Name as EditUsername, d.Name as DeleteUsername, t.WhisperUserID as DiscussionWhisperUserID, w.Name as WhisperUsername from LUM_Comment m inner join LUM_User a on m.AuthUserID = a.UserID left join LUM_Role r on a.RoleID = r.RoleID left join LUM_User e on m.EditUserID = e.UserID left join LUM_User d on m.DeleteUserID = d.UserID inner join LUM_Discussion t on m.DiscussionID = t.DiscussionID left join LUM_User w on m.WhisperUserID = w.UserID left join LUM_CategoryRoleBlock crb on t.CategoryID = crb.CategoryID and crb.RoleID = 6 left join LUM_UserBlock ab on m.AuthUserID = ab.BlockedUserID and ab.BlockingUserID = 229 left join LUM_CommentBlock cb on m.CommentID = cb.BlockedCommentID and cb.BlockingUserID = 229 where (crb.Blocked = '0' or crb.Blocked = 0 or crb.Blocked is null ) and (m.Deleted = '0' or m.Deleted = 0 ) and (m.WhisperUserID = '229' or m.WhisperUserID is null or m.WhisperUserID = 0 or m.WhisperUserID = '0' or m.AuthUserID = '229' ) and m.DiscussionID = '5338' order by m.DateCreated asc limit 0, 50
That any help?
THANK YOU, @Dinoboff!