I threw together a few lines of code that should accomplish what you want.
Code:
local cf = CreateFrame("Frame", nil, UIParent)
cf:SetFrameStrata("FULLSCREEN_DIALOG")
local c = cf:CreateTexture(nil, "BACKGROUND")
c:SetTexture(0.3,0.3,0.3)
cf:SetPoint("TOPLEFT", 30, -30)
cf:SetPoint("BOTTOMRIGHT", -30, 30)
c:SetAllPoints()
local d = cf:CreateFontString(nil, "ARTWORK")
d:SetPoint("TOPLEFT", 5, -5)
d:SetPoint("BOTTOMRIGHT", -5, 45)
d:SetFontObject(GameFontHighlightSmall)
d:SetTextColor(1,1,1)
d:SetJustifyH("LEFT")
d:SetJustifyV("TOP")
local cl = CreateFrame("Button", nil, cf)
cl:SetPoint("BOTTOM", 0, 5)
cl:SetWidth(300)
cl:SetHeight(35)
cl.t = cl:CreateFontString(nil, "ARTWORK")
cl.t:SetFontObject(GameFontHighlightMedium)
cl.t:SetTextColor(0.9,0.9,0.9)
cl.t:SetText("Close")
cl.t:SetAllPoints()
cl.tx = cl:CreateTexture(nil, "BACKGROUND")
cl.tx:SetAllPoints()
cl.tx:SetTexture(0.8,0.2,0.2)
cl:RegisterForClicks("AnyUp")
cl:SetScript("OnClick", function() cf:Hide() end)
local function UpdateText()
if not GetNumGuildEvents() or GetNumGuildEvents < 1 then return end
local tt
for index=1, GetNumGuildEvents() do
local t,p1,p2,r,y,m,d,h = GetGuildEventInfo(index)
tt = tt.."["..m.."/"..d.."/"..y.."] "
if t == "demote" then
tt = tt..p1.." demotes "..p2.." to "..r.."."
elseif t == "invite" then
tt = tt..p1.." invites "..p2.." to join the guild."
elseif t == "join" then
tt = tt..p1.." joins the guild."
elseif t == "promote" then
tt = tt..p1.." promotes "..p2.." to "..r.."."
elseif t == "quit" then
tt = tt..p1.." leaves the guild."
elseif t == "remove" then
tt = tt..p1.." kicks "..p2.." from the guild."
end
tt = tt.."\n"
end
d:SetText(tt or "")
cf:Show()
end
cf:SetScript("OnEvent", function(self, event)
self:UnregisterEvent(event)
UpdateText()
end)
cf:Hide()
SlashCmdList["ADVANCEDGUILDLOG"] = function() if not IsInGuild() then print("You are not even in a guild") return end cf:RegisterEvent("GUILD_EVENT_LOG_UPDATE") QueryGuildEventLog() end
SLASH_ADVANCEDGUILDLOG1 = "/aguildlog"
SLASH_ADVANCEDGUILDLOG2 = "/advancedguildlog"
How to use this
However, I do not have a guild with log rights to test this with right now, so I'm assuming multiple things.
1) I did not make any coding errors. There are no syntax errors as the code loaded without problems. If it causes any errors, please report.
2) Blizzard actually provides you with Guild log information that the default UI does not show when you use GetGuildEventInfo(index). If this information isn't available, my code will only show the same stuff you see in the default guild log.
Anyways, type /aguildlog or /advancedguildlog to pop up a window that contains all log information available to you.
Please report back whether the code works or not.