browse by category or date

I recently find out that this blog’s internal pingback mechanism is broken. My post about volume balance in Windows 11, didn’t pingback to the earlier post for Windows 10. I doubt I disabled the pingback myself. Because to what I know, internal pingback is good for SEO.

So I start digging around for possible cause. After a while, my suspicion is pointing at this plugin Remove XMLRPC Pingback Ping. As a test, I deactivated this plugin and proceeded to write my last post. After published my last post, the findings is confirming my suspicion. My last post which is about Telerik’s RadEditor, managed to pingback to my other post about WebComponentsIcons.

Now the tricky part is how to resend the missing pingbacks of previous posts?

How To Manually Send Pingbacks

With Google’s help, I managed to find a clue on how to manually send pingback. First, let’s create an XML file called pingback.xml:


<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
 <param>
  <value>
   <!-- source -->
   <string>_URL_SOURCE_REFERRING_TO_</string>
  </value>
 </param>
 <param>
  <value>
   <!-- target -->
   <string>_URL_DEST_REFERRED_</string>
  </value>
 </param>
</params>
</methodCall>

Specific to my case:

  • _URL_SOURCE_REFERRING_TO_ is https://sodeve.net/2021/09/how-to-adjust-audio-balance-left-right-in-windows-11/
  • _URL_DEST_REFERRED_ is https://sodeve.net/2015/09/how-to-adjust-audio-balance-left-right-in-windows-10/

The next step requires curl to be installed in your system. Once installed and accessible from console/command-line, we can execute below code in console/command-line:

curl -X POST -d @pingback.xml http://your-site.com/xmlrpc.php

For my case, it’s:

curl -X POST -d @pingback.xml https://sodeve.net/xmlrpc.php

If the post is successful, the response should be similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <params>
    <param>
      <value>
      <string>Pingback from https://sodeve.net/2021/09/how-to-adjust-audio-balance-left-right-in-windows-11/ to https://sodeve.net/2015/09/how-to-adjust-audio-balance-left-right-in-windows-10/ registered. Keep the web talking! :-)</string>
      </value>
    </param>
  </params>
</methodResponse>

Otherwise, we should able to find clue in the faultCode/faultString (specific to below response, I did make a mistake of putting the same url in source and destination 😀 ):

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
          <name>faultCode</name>
          <value><int>0</int></value>
        </member>
        <member>
          <name>faultString</name>
          <value><string></string></value>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>

That’s about it, I hope it helps. Cheers!

GD Star Rating
loading...

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

I was working on Paint.NET when I realized that the Layers window is missing. Yeah, this layer window:

I tried to press F7 to hide/show the Layers window, but it was nowhere to find.

I googled for this issue, but from what I read, people simply shrug it off. One person said in multi-display setup, the window might appears in the other monitor. I do have another monitor attached to my laptop, extending the display. But I simply can’t find the Layers window in both display.

I even uninstall, then re-install Paint.NET. But the problem persists.

Then I remember an old application that I used to automate data insertion in SAP, AutoHotKey. I remember it has functions to retrieve information of a window, and to manipulate window’s behavior.

After download and install it, I created a new folder to put the script file. On the explorer window, I right-clicked, New -> AutoHotKey script

I then edit the new .ahk script using Notepad++. First, let’s check if we can find the window

WinGet, id, PID, Layers
MsgBox, Paint.NET PID is %id%

To run the code, I simply right-click on the file, then click “Run Script”

The message box appears:

Let’s verify if this information correct by looking into Windows’ Task Manager, and find Paint.NET’s process.

Look’s like we get the correct window. Next, let’s try to find its position:

WinGetPos, X, Y, W, H, Layers
MsgBox, Layers is at %X%`,%Y% and its size is %W%x%H%

When I run above code:

Yikes, that’s outside the visible boundary of both of my displays. Thankfully, we can move it somewhere visible.

WinMove, Layers,, 100, 100 

After I run above code, the Layers window is now appear and I can continue working on Paint.NET as usual.

That’s it friends. I hope it helps!

GD Star Rating
loading...

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

I was tasked to create a proof of concept (POC) utilizing Telerik ASP.NET AJAX RadEditor. The following code will produce the standard RadEditor:

<telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor1" EnableComments="true"
	EditModes="Design"
	Width="800px" Height="800px" OnClientLoad="OnClientLoad"
	DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd">
</telerik:RadEditor>

Here is how it looks on browser:

1. Using Custom Toolbars Instead of Default Toolbars

If we want to use custom toolbar instead of the default one, we can use two methods:

  1. Custom Toolbar using declaration in ASPX page
    <telerik:radeditor runat="server" ID="RadEditor1">
       <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="ApplySizeColor" Text="Apply Size and Color"/>
            <telerik:EditorTool Name="InsertCustomDate" Text="Insert Custom Date"/>
            <telerik:EditorTool Name="ResetContent" Text="Reset Content"/>
        </telerik:EditorToolGroup>
       </Tools>        
    </telerik:radeditor>
    
  2. Custom Toolbar using ToolsFile property in ASPX page and XML file
    ASPX file

    <telerik:radeditor ToolsFile="~/ToolsFile.xml" runat="server" ID="RadEditor2"></telerik:radeditor>
    

    ToolsFile.XML file

    <root>
        <tools name="MainToolbar">
                <tool name="ApplySizeColor" Text="Apply Size and Color"/>
                <tool name="InsertCustomDate" Text="Insert Custom Date"/>
                <tool name="ResetContent" Text="Reset Content"/>
        </tools>
    </root>
    

Both ways will produce the same result:

To customize the button’s icon, add the following CSS:

        .reResetContent.reToolIcon::before {
            content: "\e034";
        }
        .reInsertCustomDate.reToolIcon::before {
            content: "\e108";
        }
        .reApplySizeColor.reToolIcon::before {
            content: "\e50e";
        }

We can see the result of the change:

The key to the customization is command name. For example the command name in the custom toolbar is ApplySizeColor, therefore the CSS is .reApplySizeColor. As for the icons, you can refer to the full list of WebComponentsIcons

2. Add Custom Button into Default Toolbar

protected void Page_Load(object sender, EventArgs e)
{

            RadEditor1.EnsureToolsFileLoaded();

            Telerik.Web.UI.EditorToolGroup main = new Telerik.Web.UI.EditorToolGroup();
            main.Tab = "Changes";
            main.Tag = "Changes";
            RadEditor1.Tools.Insert(0, main);

            Telerik.Web.UI.EditorTool custom1 = new Telerik.Web.UI.EditorTool("CustomSave");
            main.Tools.Add(custom1);
            custom1.Text = "Save";
            custom1.ShowText = true;

            Telerik.Web.UI.EditorTool custom2 = new Telerik.Web.UI.EditorTool("CustomSubmit");
            main.Tools.Add(custom2);
            custom2.Text = "Submit";
            custom2.ShowText = true;
}

Add below CSS to customize the buttons

        .reToolIcon.reCustomSave::before {
            content: '\e109' !important;
        }

        .reToolIcon.reCustomSubmit::before { 
            content: '\e118' !important;
        }

This is how it looks in browser:

Next, let’s add the function handler when this button is clicked:

<script type="text/javascript">
        Telerik.Web.UI.Editor.CommandList["CustomSave"] = function (commandName, editor, args) {
            alert("Custom Save"); 
        };

        Telerik.Web.UI.Editor.CommandList["CustomSubmit"] = function (commandName, editor, args) {
            alert("Custom Submit"); 
        };
</script>

There are plenty of actions on RadEditor which we can trigger using this custom toolbar button. But maybe that’s for another post.

I hope it helps. Cheers!

GD Star Rating
loading...

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: