Posts by: fly06

Posts: 263
Post: 7144
Topic: How to refresh a gadget using ajax?

Let's say that you have an Ajax.php file in your plugin directory.

In this Ajax.php file you start by recreating a gpEasy context and once it's done you can safely call your gadget by using the GetGadget() method of the gpOutput class.

The jQuery ajax request can now point directly to this Ajax.php file.

I hope that answers your question. 

5 years ago
Post: 7143
Topic: Delete blog post bug?

As expected, this is not a real bug but an incompatibility issue between SimpleBlogSEO v1.3 and Simple_Blog v2.

To fix this problem, open the Hooks/WhichPage.php file in the data/_addoncode/<SimpleBlogSEO>/ directory.

In the  _deleteSefUrl() method of the SimpleBlogSEO_WhichPage class, replace this block of code:

        // Not in the delete context
        if (($cmd = common::GetCommand()) != 'delete') {
            return;
        }

        // No id!
        if (!isset($_POST['id']) || empty($_POST['id'])) {
            return;
        }

        $id = $_POST['id'];    

by this one:

        // Not in the delete context
        // Changed in v1.4
        // delete has been renamed deleteentry in Simple_Blog v2
        $cmd = common::GetCommand();
        if (($cmd != 'delete') && ($cmd != 'deleteentry')) {
            return;
        }

        // No id!
        // Changed in v1.4
        // id has been renamed del_id in Simple_Blog v2
        if (isset($_POST['del_id']) && !empty($_POST['del_id'])) {
            $id = $_POST['del_id'];
        } elseif (isset($_POST['id']) || !empty($_POST['id'])) {
            $id = $_POST['id'];
        } else {
            return;
        }

Version 1.4 of SimpleBlogSEO will be Simple_Blog v2 compliant.

It will be released once all inconsistency issues are identified and fixed.

 

 

 

5 years ago
Post: 7141
Topic: Delete blog post bug?

We will first start by cleaning your hits data.

Donwload this file from your server to your computer:

data/_addondata/<plugin_folder>/hits.php

Open it in a text editor and locate the array that contains the post_id => hits_count mapping.

For intance:

$hits = array (
  5 => 7,
  6 => 4,
  7 => 2,
);

Then remove the line that corresponds to the deleted post.

Save the file and upload it to the server.

This should solve the 'Error: Unknown Title' problem.

A true bug fix is coming soon.

Edited: 5 years ago
Post: 7137
Topic: Delete blog post bug?

This was a bug in SimpleBlogSEO prior to version 1.2 (solved in v1.2).

Btw, I realize that I haven't had the opportunity to test SimpleBlogSEO with version 2 of Simple_Blog.

I'll get back to you once it's done.

5 years ago
Post: 7136
Topic: search hook for special link

Have a look at the Search.php file shipped with Simple_Blog.

It's a good example of how a plugin can be integrated within the gpeasy search feature.

https://gpeasy.com/Plugins/17_Simple_Blog

5 years ago
Post: 7135
Topic: How to refresh a gadget using ajax?

Problem solved.

Thanks.

5 years ago
Post: 7128
Topic: How to refresh a gadget using ajax?

Hi,

I'd like to refresh the html content of a gadget using ajax (by clicking on a refresh button for instance).

How can I reach the gadget php file from the js code (ajax) if my plugin does not contain a Special link?

(I don't need any Special link in this plugin).

 

5 years ago
Post: 7127
Topic: Delete blog post bug?

What version of the below scripts are installed on you server:

  • gpEasy
  • Simple_Blog
  • SimpleBlogSEO

?

Thanks.

5 years ago
Post: 7119
Topic: Changing email confirmation wording

Hello,

To change the text (different wording or language), go in the plugin configuration and click on the 'Editable text' link.

Hope this helps.

 

5 years ago
Post: 7116
Topic: search hook for special link

$diagcontent = ob_get_clean();

Now $diagcontent contains the gpEasy buffer content which itself contains the html code echo-ed by the special_gpsearch::Search() method including the search string.

This explains why your content is always returned in the search results whether it matches the search pattern or not.

I don't know what is the content of your system.php file but assuming it echo-es your plugin html content, adding an ob_start(); instruction just before the include should do the trick.

ob_start();
include($PluginFile);
$diagcontent = ob_get_clean();

 

Edited: 5 years ago

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register