User talk:Daman
From Data Realms Wiki
(Moved the enormous block of code below the other headings.) |
(→Uploaded images calling mkdir() ??!: new section) |
||
Line 422: | Line 422: | ||
end | end | ||
</code> | </code> | ||
+ | |||
+ | == Uploaded images calling mkdir() ??! == | ||
+ | |||
+ | I'm a little alarmed by this, but on some of the images I've recently uploaded, I consistently get these errors appearing... | ||
+ | |||
+ | Warning: mkdir() [function.mkdir]: Permission denied in /home/drlwiki/public_html/includes/GlobalFunctions.php on line 2176 | ||
+ | |||
+ | Warning: wfMkdirParents: failed to mkdir "/home/drlwiki/public_html/images/thumb/c/c6/Bulldog_GG-49_INDEV--4X.png" mode 511 in /home/drlwiki/public_html/includes/GlobalFunctions.php on line 2179 | ||
+ | File:Bulldog GG-49 INDEV--4X.png | ||
+ | |||
+ | Is this something the wiki is doing when images of a certain sizes are uploaded, or are these files infected?? |
Latest revision as of 04:22, 14 July 2012
Contents |
Questions
Could I have permission to change the images displayed on the front page?
Mainly the Lua image, which is hideously scaled, and perhaps also the Cortex Command 'C'.
Thanks. -Petethegoat 17:23, 4 June 2010 (UTC)
Also, is there anywhere suitable for general discussion and questions about the wiki? Ex: Is there an easy method of flagging up a page for deletion? -Petethegoat 18:46, 4 June 2010 (UTC)
- You can talk about the wiki on the forum. General discussion or feedback or even OT is good. Add a talk section to the main page about what you think needs to be replaced and your proposed replacements, I'd like to see. Pages can be marked for deletion using
{{MarkDelete}}
also now my fanclub is gone :( Sysop Daman 19:20, 4 June 2010 (UTC)
Thanks for my unblocking. I continue to fill Russian section. Ximximik 16:24 5 June 2010 (UTC)
Well, I got around to adding some suggestions/questions to the main talk page the other day, and I'd like to know your thoughts on my thoughts. -Petethegoat 01:18, 10 June 2010 (UTC)
Spam and your signature.
Well, as the title says, your sig seems to be attracting some spam that can evade the filters. I'd lock it, but you haven't given me the power yet. (that is some super-subtle hinting going on there) -Petethegoat 23:06, 13 June 2010 (UTC)
drlwiki.thebunny.info
I assume you're able to merge any changes made to this back into the old wiki? -Petethegoat 15:08, 1 July 2010 (UTC)
Enormous Block of Lua.
- include('shared.lua')
- SetupBrowserMat(ENT, "chrome/radio", 720, 480, 0.075)
- local zerovec = Vector(0,0,0)
- local MaxNameLength = 32
- hook.Add("CanMousePress", "DisableRadio", function()
- if v.Browser && v.MouseRayInteresct && v:MouseRayInteresct() then
- return false
- end
- end
- end )
- usermessage.Hook("ShowRadioSelect", function(umsg)
- local ent = umsg:ReadEntity()
- if !BASS || !chrome then
- GtowerMessages:AddNewItem( GetTranslation("PleaseFullGtowerPack") )
- return
- end
- if ent.Browser then
- ent.DrawTranslucent = ent.BrowserDraw
- return
- end
- ent:InitBrowser(ent:GetTable())
- ent.Browser:LoadURL("http://www.gmodtower.org/gmtonline/radio/")
- ent.DrawTranslucent = ent.BrowserDraw
- ent.CursorOut = 0
- end)
- local GreenBox = Color(0, 255, 0, 50)
- local RedBox = Color(255, 0, 0, 50)
- ENT.RenderGroup = RENDERGROUP_BOTH
- function ENT:OpeningURL(url)
- self:ForcePlaySelect()
- return
- end
- self:RemoveBrowser()
- self.DrawTranslucent = self.MessageDraw
- end
- function ENT:FinishLoading()
- self:ForcePlaySelect()
- end
- function ENT:OnEnterBrowser()
- self.CursorOut = 0
- end
- function ENT:OnLeaveBrowser()
- self.CursorOut = CurTime() + 2
- end
- function ENT:Initialize()
- self.BoxColor = RedBox
- self.DrawTranslucent = self.MessageDraw
- if BASS == nil then
- self.DrawMessage = GetTranslation("PleaseFullGtowerPack")
- return
- end
- self.DrawMessage = GetTranslation("RadioTurnedOff")
- self.CurStation = ""
- self.radiostream = nil
- self.NextCalcName = 0
- self.TextWidth, self.TextHeight = 150, 20
- self.CurName = ""
- self.ShouldDrawName = false
- self.TextOffset = 0
- self.TargetTextOffset = 0
- self:SetNetworkedVarProxy("CurChan", self.ChannelChanged )
- self:SetLargeBounds()
- self.CursorOut = 0
- end
- function ENT:StopRadio()
- if self.radiostream then
- self.radiostream:stop()
- end
- self.BoxColor = RedBox
- self.DrawMessage = GetTranslation("RadioTurnedOff")
- if !self.Browser then
- self.DrawTranslucent = self.MessageDraw
- end
- self.ShouldDrawName = false
- self.radiostream = nil
- end
- function ENT:CalculateEarShot()
- if !GTowerLocation then
- self.InEarShot = true
- return
- end
- local radioloc = GTowerLocation:FindPlacePos(self:GetPos())
- local plyloc = GTowerLocation:FindPlacePos(LocalPlayer():GetPos())
- self.InEarShot = radioloc != nil && plyloc != nil && (plyloc == radioloc)
- end
- function ENT:StartRadio( stream )
- if !stream || #stream == 0 then return end
- self.BoxColor = GreenBox
- self.DrawTranslucent = self.RadioDraw
- self:RemoveBrowser()
- if self.DrawTranslucent != self.RadioDraw then
- return // this means we stopped it between the startradio and this callback
- end
- self:CalculateEarShot()
- if !self.InEarShot then
- self:StopRadio()
- return
- end
- if !basschannel then
- self.DrawMessage = GetTranslation("RadioTimeout")
- self.DrawMessage = GetTranslation("RadioUnsupportedFormat")
- self.DrawMessage = GetTranslation("RadioBASSInitError")
- else
- end
- self.BoxColor = RedBox
- self.DrawTranslucent = self.MessageDraw
- return
- end
- self.radiostream = basschannel
- self.radiostream:set3dposition(self:GetPos(), zerovec, zerovec)
- self.radiostream:play()
- self.NextCalcName = 0
- end)
- end
- function ENT:ChannelChanged( name, oldval, nwc )
- if nwc == self.CurStation then return end
- self.CurStation = nwc
- if #nwc == 0 && self.StopRadio then
- self:StopRadio()
- return
- end
- if !self.StartRadio then return end
- self:CalculateEarShot()
- if !self.InEarShot then return end
- self:StartRadio(self.Stream)
- end
- function ENT:OnRemove( )
- self:RemoveBrowser()
- self:StopRadio()
- end
- function ENT:BaseDraw()
- local EntPos = self:GetPos() + ( self:GetForward() * 4 ) + self:GetUp() * -5
- local PlyDistance = EntPos:Distance( LocalPlayer():GetPos() )
- if PlyDistance > 350 then
- return
- end
- local ang = self:GetAngles()
- if (LocalPlayer():GetPos() - EntPos ):DotProduct( ang:Forward() ) < 0 then
- return
- end
- local AlphaRatio = 1.0
- if PlyDistance > 128 then
- AlphaRatio = 1 - (PlyDistance - 128) / 222
- self.BoxColor.a = AlphaRatio * 50
- else
- self.BoxColor.a = 50
- end
- ang:RotateAroundAxis(ang:Right(), -90 )
- ang:RotateAroundAxis(ang:Up(), 90 )
- cam.Start3D2D( EntPos , ang, 0.1)
- return AlphaRatio
- end
- function ENT:MessageDraw()
- local AlphaRatio = self:BaseDraw()
- if AlphaRatio == nil then return end
- self:DrawMyText( self.DrawMessage, AlphaRatio )
- cam.End3D2D()
- end
- function ENT:Draw()
- self:DrawModel()
- end
- function ENT:GetPosBrowser()
- return self:GetPos() + (self:GetForward() * 4)
- end
- function ENT:DrawBrowser()
- surface.SetDrawColor(255, 255, 255, 255)
- surface.SetTexture(self.TexId)
- surface.DrawTexturedRect(0,0, self.TexWidth, self.TexHeight)
- if self.CursorOut > 0 then
- surface.SetDrawColor(100, 100, 100, 150)
- surface.DrawRect(0, 0, self.Width, self.Height)
- end
- end
- function ENT:BrowserDraw()
- if !self.Browser then
- self.DrawTranslucent = self.MessageDraw
- return
- end
- self:BaseBrowserDraw()
- end
- function ENT:RadioDraw()
- if self.radiostream && !self.radiostream:getplaying() then
- self:StopRadio()
- return
- end
- local AlphaRatio = self:BaseDraw()
- if AlphaRatio == nil then return end
- if self.radiostream && self.ShouldDrawName then
- self:DrawMyText( GetTranslation("RadioPlaying") .. ": " .. self.CurName, AlphaRatio )
- else
- self:DrawMyText( GetTranslation("RadioLoading"), AlphaRatio )
- end
- self:DrawSpectrumAnalyzer()
- cam.End3D2D()
- end
- function ENT:DrawMyText( text, AlphaRatio )
- surface.SetFont( "ChatFont" )
- local w,h = surface.GetTextSize( text )
- draw.RoundedBox(4, -100 , -145, w + 16, h + 8 , self.BoxColor )
- surface.SetTextColor( 255, 255, 255, 255 * AlphaRatio)
- surface.SetTextPos( -100 + 8 , -145 + 4 )
- surface.DrawText(text)
- end
- local SPECHEIGHT= 64
- local SPECWIDTH = 300
- local BANDS = 28
- local ox, oy = -100, -45
- function ENT:DrawSpectrumAnalyzer()
- local chan = self.radiostream
- if !chan then return end
- local fft = chan:fft2048()
- local b0 = 0
- surface.SetDrawColor(0, 0, 255, 255)
- for x = 0, BANDS-2 do
- local sum = 0
- local sc = 0
- if (b1>1023) then b1=1023 end
- if (b1<=b0) then b1=b0+1 end
- sc=10+b1-b0;
- while b0 < b1 do
- sum = sum + fft[2+b0]
- b0 = b0 + 1
- end
- surface.DrawRect(ox + (x*(SPECWIDTH/BANDS)), oy - y - 1, (SPECWIDTH/BANDS) - 2, y + 1)
- end
- end
- function ENT:Think()
- if self.Browser then
- self:MouseThink()
- if self.CursorOut > 0 && CurTime() > self.CursorOut then
- self:RemoveBrowser()
- self.DrawTranslucent = self.MessageDraw
- end
- end
- if self.radiostream then self:RadioThink() end
- end
- function ENT:RadioThink()
- local pos = self:GetPos()
- pos.z = -pos.z
- self.radiostream:set3dposition(pos, zerovec, zerovec)
- end
- hook.Add("Location", "PlayerLeaveRoomRadio", function(ply, location)
- if ply != LocalPlayer() || !BASS then return end
- if v.CalculateEarShot then
- v:CalculateEarShot()
- if !v.InEarShot && v.radiostream then
- v:StopRadio()
- elseif v.InEarShot && !v.radiostream then
- v:StartRadio(v.Stream)
- end
- end
- end
- end)
- local function BassThink()
- local ply = LocalPlayer()
- local eyepos = ply:EyePos()
- eyepos.z = -eyepos.z
- local vel = ply:GetVelocity()
- local eyeangles = ply:GetAimVector():Angle()
- // threshold, 89 exact is backwards accord to BASS
- local forward = eyeangles:Forward()
- local up = eyeangles:Up() * -1
- BASS.SetPosition(eyepos, vel * 0.005, forward, up)
- end
- if BASS then
- hook.Add("Think", "UpdateBassPosition", BassThink )
- end
Uploaded images calling mkdir() ??!
I'm a little alarmed by this, but on some of the images I've recently uploaded, I consistently get these errors appearing...
Warning: mkdir() [function.mkdir]: Permission denied in /home/drlwiki/public_html/includes/GlobalFunctions.php on line 2176
Warning: wfMkdirParents: failed to mkdir "/home/drlwiki/public_html/images/thumb/c/c6/Bulldog_GG-49_INDEV--4X.png" mode 511 in /home/drlwiki/public_html/includes/GlobalFunctions.php on line 2179 File:Bulldog GG-49 INDEV--4X.png
Is this something the wiki is doing when images of a certain sizes are uploaded, or are these files infected??