4 Tips on Building an Effective Intranet Website Using WordPress

Featured Imgs 13

Communication is the glue that keeps teams and organizations together. When communication is done correctly, team members can work seamlessly with each other, and the organization as a whole can grow exponentially. More and more businesses are now setting up their own intranet website to allow team members to share information and documents, communicate with […]

The post 4 Tips on Building an Effective Intranet Website Using WordPress appeared first on WPArena.

Your Guide to Blogger Outreach: How-To and What You Should Know

Fotolia Subscription Monthly 4685447 Xl Stock

You’ve followed all of the marketing guides, sales funnel tips, and carefully built your subscriber list, yet your online business seems to be plateauing. What gives? This problem is common for a lot of online business owners. You don’t really want to use typical social media influencers because it feels… overdone or fake. Instead, you’d […]

The post Your Guide to Blogger Outreach: How-To and What You Should Know appeared first on WPArena.

How to move tkinter window | override-redirect flag

558fe5180e0e8fc922d31c23ef84d240

I have already created functions to handle that. But it's shacking when i try to move( After add more widgets). Can somebody help me with that.

from tkinter import *
from PIL import Image, ImageTk
import time

class modtk(Tk):
    toptitlebar = None
    maincanvaswindow = None
    resizeon = False
    dragging = False

    def updatetopbut(self, event):
        self.closebutton.config(fg=self.ttfg)
        self.fullscreenbutton.config(fg=self.ttfg)
        self.minimizebutton.config(fg=self.ttfg)

    def downdatetopbut(self, event):
        self.closebutton.config(fg=self.ttbg)
        self.fullscreenbutton.config(fg=self.ttbg)
        self.minimizebutton.config(fg=self.ttbg)

    def modify(self, title="tk", icon=None, titlebg="#ffffff", titlefg="#000000", bg="#EBEBEB"):
        self.tt = title
        self.ico = icon
        self.ttbg = titlebg
        self.ttfg = titlefg
        self.bgbg = bg
        self.title(title)
        self.width = 150
        self.height = 200
        self.maximized = False
        self.map = 0
        self.resizeside = None
        self.moveok = False
        self.minsizex = 0
        self.minsizey = 0
        self.resizeadjx = self.winfo_rootx()
        self.resizeadjy = self.winfo_rooty()
        self.update_idletasks()
        self.overrideredirect(True)
        self.config(bg=self.bgbg)
        if not icon == None:
            try:
                icon = Image.open(icon)
                icon = icon.resize((30, 30))
                icon = ImageTk.PhotoImage(icon)
            except Exception as e:
                print(e, "File should be a .png file.")
                icon = None
        __class__.toptitlebar = Frame(self, height=34, bd=0, highlightthickness=1, highlightbackground="#000000",
                                      bg=titlebg)
        __class__.toptitlebar.pack(side=TOP, fill=X)

        __class__.toptitlebar.bind("<ButtonPress-1>", self.SaveLastClickPos)
        __class__.toptitlebar.bind("<B1-Motion>", self.Dragging)
        __class__.toptitlebar.bind("<Double-Button-1>", self.maximize)
        __class__.toptitlebar.bind("<Enter>", self.updatetopbut)
        __class__.toptitlebar.bind("<Leave>", self.downdatetopbut)
        __class__.toptitlebar.bind("<ButtonRelease-1>", self.releaseresize)

        self.titlelabel = Label(__class__.toptitlebar, bg=titlebg, fg=titlefg, bd=0, padx=0, pady=0)
        self.titlelabel.image = icon
        self.titlelabel.config(image=icon, compound=LEFT, text="   %s" % title)
        self.titlelabel.place(x=0, y=0)

        self.titlelabel.bind("<ButtonPress-1>", self.SaveLastClickPos)
        self.titlelabel.bind("<B1-Motion>", self.Dragging)
        self.titlelabel.bind("<Double-Button-1>", self.maximize)
        self.closefunction = lambda event: self.destroy()

        self.closebutton = Label(__class__.toptitlebar, text="X",
                                 bd=0,
                                 bg=titlebg, fg=titlebg,
                                 padx=14, pady=7)
        self.closebutton.pack(side=RIGHT)

        self.closebutton.bind("<Enter>", lambda event: self.closebutton.config(bg="#FF0000"))
        self.closebutton.bind("<Leave>", lambda event: self.closebutton.config(bg=titlebg))
        self.closebutton.bind("<Button-1>", self.closefunction)

        self.fullscreenbutton = Label(__class__.toptitlebar, text="[]",
                                      bd=0,
                                      bg=titlebg, fg=titlebg,
                                      padx=14, pady=7)
        self.fullscreenbutton.pack(side=RIGHT)

        self.fullscreenbutton.bind("<Enter>", lambda event: self.fullscreenbutton.config(bg="#dddddd"))
        self.fullscreenbutton.bind("<Leave>", lambda event: self.fullscreenbutton.config(bg=titlebg))
        self.fullscreenbutton.bind("<Button-1>", self.maximize)

        self.minimizebutton = Label(__class__.toptitlebar, text="-",
                                    bd=0,
                                    bg=titlebg, fg=titlebg,
                                    padx=14, pady=7)
        self.minimizebutton.pack(side=RIGHT)

        self.minimizebutton.bind("<Enter>", lambda event: self.minimizebutton.config(bg="#dddddd"))
        self.minimizebutton.bind("<Leave>", lambda event: self.minimizebutton.config(bg=titlebg))
        self.minimizebutton.bind("<Button-1>", self.minimize)
        self.bind("<Map>", self.frame_mapped)

        __class__.maincanvaswindow = Canvas(self, width=self.width, height=self.height, bg=bg, highlightthickness=1,
                                            highlightbackground="#000000")
        __class__.maincanvaswindow.pack(side=TOP)

        self.bind("<Button-1>", self.startresize)
        self.bind("<B1-Motion>", self.resizewin)
        self.bind("<Motion>", self.isonresize)
        self.bind("<ButtonRelease-1>", self.releaseresize)

        self.lastClickX = 0
        self.lastClickY = 0
        self.map = 0
        self.maximized = False
`Inline Code Example Here`
    def modgeometry(self, w, h, x=None, y=None):
        w = int(w)
        h = int(h)
        self.width = w
        self.height = h
        if (__class__.maincanvaswindow.winfo_width() != w or __class__.maincanvaswindow.winfo_height() != h) and not __class__.resizeon and not __class__.dragging:
            __class__.maincanvaswindow.config(width=w, height=h)
        if not x == None or not y == None:
            x = int(x)
            y = int(y)
            self.geometry('%dx%d+%d+%d' % (w, (h + 33), x, y))
        else:
            self.geometry('%dx%d' % (w, (h + 33)))
`Inline Code Example Here`
    def SaveLastClickPos(self, event):
        if not self.maximized:
            if event.y > 5 and event.x > 5 and event.x < (self.winfo_width() - 5):
                self.lastClickX = event.x
                self.lastClickY = event.y
                self.moveok = True
            else:
                self.moveok = False
`Inline Code Example Here`
    def Dragging(self, event):
        if self.moveok:
            if not self.maximized:
                x = self.winfo_x() + (event.x - self.lastClickX)
                y = self.winfo_y() + (event.y - self.lastClickY)
                self.modgeometry(self.winfo_width(), (self.winfo_height() - 33), x, y)

    def frame_mapped(self, event=None):
        print(event)
        if self.map == 5:
            print("yes")
            self.update_idletasks()
            # self.deiconify()
            self.overrideredirect(True)
            self.map = 0
        else:
            self.map += 1

    def minimize(self, event=None):
        print("no")
        #self.map = 0
        self.update_idletasks()
        self.overrideredirect(False)
        self.iconify()

    def maximize(self, event=None):
        if not self.maximized:
            self.oldwidth = self.winfo_width()
            self.oldheight = self.winfo_height()
            self.oldx = self.winfo_x()
            self.oldy = self.winfo_y()
            self.maximized = True
            self.modgeometry(self.winfo_screenwidth(), (self.winfo_screenheight() - 33), 0, 0)
        else:
            self.maximized = False
            self.modgeometry(self.oldwidth, self.oldheight, self.oldx, self.oldy)

    def closefunc(self, func):
        self.closefunction = lambda event: func()
        self.closebutton.bind("<Button-1>", self.closefunction)

    def winfo_heightr(self):
        return (self.winfo_height() - 33)

    def startresize(self, event=None):
        print(event)
        if not self.maximized:
            #if event.widget == __class__.maincanvaswindow:
            if True:
                self.resizelastx = event.x
                self.resizelasty = event.y
                self.resizelastw = self.winfo_width()
                self.resizelasth = self.winfo_height() - 33
                self.resizeadjx = self.winfo_rootx()
                self.resizeadjy = self.winfo_rooty()
                __class__.resizeon = True
                print("canvas")
                nonety = True
##                if event.x < 5 and event.y < (self.winfo_height() - 33 -5):
##                    self.resizeside = "left"
##                    nonety = False
                if event.x > (self.winfo_width() - 5) and event.y < (self.winfo_height() - 33 -5):
                    self.resizeside = "right"
                    nonety = False
                if event.y >(self.winfo_height() -33 - 5) and event.x > 5 and event.x < (self.winfo_width() - 5):
                    self.resizeside = "down"
                    nonety = False
                if event.x > (self.winfo_width() - 5) and event.y > (self.winfo_height() - 33 - 5):
                    self.resizeside = "rightdown"
                    nonety = False
##                if event.x < 5 and event.y > (self.winfo_height() -33 - 5):
##                    self.resizeside = "leftdown"
##                    nonety = False
                if nonety:
                    self.resizeside = ""
                print(self.resizeside)
##            elif event.widget == __class__.toptitlebar:
##                self.resizelastx = event.x
##                self.resizelasty = event.y
##                self.resizelastw = self.winfo_width()
##                self.resizelasth = self.winfo_height() - 33
##                self.resizeadjx = self.winfo_rootx()
##                self.resizeadjy = self.winfo_rooty()
##                print("titlebar")
##                nonety = True
##                if event.x < 5 and event.y > 5:
##                    self.resizeside = "left"
##                    nonety = False
##                if event.y < 5 and event.x > 5 and event.x < (self.winfo_width() - 5):
##                    self.resizeside = "up"
##                    nonety = False
##                if event.x < 5 and event.y < 5:
##                    self.resizeside = "leftup"
##                    nonety = False
##                if event.x > (self.winfo_width() - 5) and event.y > 5:
##                    self.resizeside = "right"
##                    nonety = False
##                if event.x > (self.winfo_width() - 5) and event.y < 5:
##                    self.resizeside = "rightup"
##                    nonety = False
##                if nonety:
##                    self.resizeside = ""
##            else:
##                self.resizeside = ""

    def isonresize(self, event=None):
        print(event)
        if not self.maximized:
            #if event.widget == __class__.maincanvaswindow:
            if True:
                print("canvas")
                nonety = True
##                if event.x < 5:
##                    self.config(cursor="size_we")
##                    nonety = False
                if event.x > (self.winfo_width() - 5):
                    self.config(cursor="size_we")
                    nonety = False
                if event.y >(self.winfo_height() - 33 - 5):
                    self.config(cursor="size_ns")
                    nonety = False
                if event.x > (self.winfo_width() - 5) and event.y > (self.winfo_height() - 33 - 5):
                    self.config(cursor="size_nw_se")
                    nonety = False
##                if event.x < 5 and event.y > (self.winfo_height() - 33 - 5):
##                    self.config(cursor="size_ne_sw")
##                    nonety = False
                if nonety:
                    self.config(cursor="")
##            elif event.widget == __class__.toptitlebar:
##                print("titlebar")
##                nonety = True
##                if event.x < 5 and event.y > 5:
##                    self.config(cursor="size_we")
##                    nonety = False
##                if event.y < 5 and event.x > 5 and event.x < (self.winfo_width() - 5):
##                    self.config(cursor="size_ns")
##                    nonety = False
##                if event.x < 5 and event.y < 5:
##                    self.config(cursor="size_nw_se")
##                    nonety = False
##                if event.x > (self.winfo_width() - 5) and event.y > 5:
##                    self.config(cursor="size_we")
##                    nonety = False
##                if event.x > (self.winfo_width() - 5) and event.y < 5:
##                    self.config(cursor="size_ne_sw")
##                    nonety = False
##                if nonety:
##                    self.config(cursor="")
##            else:
##                self.config(cursor="")

    def resizewin(self, event=None):
        print(event)
        if not self.maximized:
            if self.resizeside == "right":
                neww = self.width + (event.x - self.resizelastx)
                print(self.resizeside)
                if neww < self.minsizex:
                    neww = self.minsizex
                self.resizelastx = neww
                self.modgeometry(neww, self.resizelasth)
            if self.resizeside == "rightdown":
                print(self.resizeside)
                neww = self.width + (event.x - self.resizelastx)
                newh = self.height + (event.y - self.resizelasty)
                if neww < self.minsizex:
                    neww = self.minsizex
                if newh < self.minsizey:
                    newh = self.minsizey
                self.resizelastx = neww
                self.resizelasty = newh
                self.modgeometry(neww, newh)
            if self.resizeside == "down":
                newh = self.height + (event.y - self.resizelasty)
                if newh < self.minsizey:
                    newh = self.minsizey
                self.resizelasty = newh
                self.modgeometry(self.resizelastw, newh)
            if self.resizeside == "rightup":
                print(self.resizeside)
                neww = self.width + (event.x - self.resizelastx)
                newh = self.resizelasth + (self.resizelasty - event.y)
                if neww < self.minsizex:
                    neww = self.minsizex
                if newh < self.minsizey:
                    newh = self.minsizey
                self.resizelastx = neww
                newy = self.resizeadjy - (self.resizelasty - event.y)
                newx = self.resizeadjx
                self.modgeometry(neww, newh, newx, newy)
            if self.resizeside == "up":
                print(self.resizeside)
                newh = self.resizelasth + (self.resizelasty - event.y)
                if newh < self.minsizey:
                    newh = self.minsizey
                newy = self.resizeadjy - (self.resizelasty - event.y)
                newx = self.resizeadjx
                self.modgeometry(self.resizelastw, newh, newx, newy)
            if self.resizeside == "leftup":
                print(self.resizeside)
                neww = self.resizelastw + (self.resizelastx - event.x)
                newh = self.resizelasth + (self.resizelasty - event.y)
                if neww < self.minsizex:
                    neww = self.minsizex
                if newh < self.minsizey:
                    newh = self.minsizey
                newy = self.resizeadjy - (self.resizelasty - event.y)
                newx = self.resizeadjx - (self.resizelastx - event.x)
                self.modgeometry(neww, newh, newx, newy)
            if self.resizeside == "left":
                print(self.resizeside)
                neww = self.resizelastw + (self.resizelastx - event.x)
                newx = self.resizeadjx - (self.resizelastx - event.x)
                if neww < self.minsizex:
                    neww = self.minsizex
                    newx = self.resizeadjx
                newy = self.resizeadjy
                self.modgeometry(neww, self.resizelasth, newx, newy)
            if self.resizeside == "leftdown":
                print(self.resizeside)
                neww = self.resizelastw + (self.resizelastx - event.x)
                newh = self.height + (event.y - self.resizelasty)
                if neww < self.minsizex:
                    neww = self.minsizex
                if newh < self.minsizey:
                    newh = self.minsizey
                self.resizelasty = newh
                newx = self.resizeadjx - (self.resizelastx - event.x)
                newy = self.resizeadjy
                self.modgeometry(neww, self.resizelasth, newx, newy)

    def releaseresize(self, event=None):
        if __class__.resizeon:
            __class__.resizeon = False
            self.width = self.winfo_width()
            self.height = self.winfo_heightr()
            __class__.maincanvaswindow.config(width=self.winfo_width(), height=self.winfo_heightr())
        if __class__.dragging:
            __class__.dragging = False

    def modminsize(self, event=None, w=None, h=None):
        if w != None:
            self.minsizex = w
        if h != None:
            self.minsizey = h

    def updatewin(self):
        self.update()

    def wmroot(self):
        return __class__.maincanvaswindow

    def retwm(self):
        return self

if __name__ == "__main__":
    root = modtk()
    root.modify(title="Modified window", titlebg="#000427", titlefg="#ffffff")
    root.modgeometry(600, 400)
    root.modminsize(600, 400)

    label01 = Label(root.wmroot(), text="This works")

    def closewin():
        root.destroy()
        quit()

    root.closefunc(closewin)

    windowExit = False

    while not windowExit:

        label01.place(x=(root.winfo_width() // 2), y=(root.winfo_heightr() // 2))

        root.updatewin()

        time.sleep(0.05)

closewin()

Uploading Avatars and Screenshots is better, too.

Featured Imgs 23

With all this recent work we did upgrading our Asset Hosting feature, there were some side-benefits around the app as well.

For example, as a PRO member, you can upload replacement screenshots for your Pens if you wish to. The uploader for those is the much nicer Filestack uploader now. Here’s how that works:

Similarly, avatar uploading users the new upload experience. So you can upload whatever ol’ image you have around (to your profile settings), even if it’s gigantic or the wrong size, and you’ll have the opportunity to crop it as you upload it:

We’ll take care of making sure it’s sized properly and being served as snappily as we can!

We even use this stuff internally. For example, when we build the email we send out each week for the CodePen Challenges, we have this slick little uploader to use for ourselves, making our own workflows just all that much smoother.

The post Uploading Avatars and Screenshots is better, too. appeared first on CodePen Blog.

How to Easily Hide Widget Title in WordPress

Wp Plugins

Do you want to hide the title of a WordPress widget in your sidebar or footer?

WordPress widgets make it easy to drag and drop dynamic content into your theme to create unique layouts. However if you need to hide the widget title, then it typically requires coding knowledge of CSS and HTML.

In this article, we’ll show you how to easily hide the widget title in WordPress (without any code).

Hiding widget title in WordPress

Why Hide Widget Title in WordPress?

WordPress displays a default title for widgets, and it also allows you to rename them if you want. Most top WordPress themes will then display this title in the sidebar on your site.

Widgets titles displayed in sidebar

However, sometimes you may not want to display the widget title in the WordPress blog sidebar. By default, there is no built-in option to simply switch off widget titles.

That being said, let’s take a look at how you can easily hide the widget title in the WordPress sidebar.

Hiding Widget Title in WordPress

First, you want to install and activate the Widget Options plugin. For more details, please see our complete guide on how to install a WordPress plugin.

Once the plugin is activated, head over to Appearance » Widgets area in your WordPress admin area. Next, drag and drop a widget to your sidebar or any other widget-ready area on your site.

Drag and drop widget into sidebar

In this example, we’re going to remove the widget title ‘Search The Site’ from our search box in the sidebar.

Sidebar widget view

Simply click the arrow to open the widget and view the options to hide the title.

Hide widget title settings

Make sure you click on the ‘gear’ icon, and then check the box next to ‘Check to hide widget title’ and click the ‘Save’ button.

Now, when you view your site, the WordPress search box will appear without the widget title.

Widget title hidden on site

You can use this plugin to hide any widget title. The plugin also comes with multiple settings to hide or display titles based on page or post types and even screen sizes.

We hope this article helped you learn how to easily hide widget titles in WordPress. You may also want to check out our list of the most useful WordPress widgets for your site, and our comparison of the best drag and drop WordPress page builder plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Easily Hide Widget Title in WordPress appeared first on WPBeginner.

Thimble Launches Insurtech API for Small Businesses

Featured Imgs 23

Thimble, the insurtech startup that helps small businesses succeed on their own terms, has released a new API for partners who serve the small business and professional services communities. With the Thimble API, partners can offer flexible insurance policies, available monthly or on-demand, to businesses within their own user experience.