Not logged in. · Lost password · Register
Page:  1  2  3  next 

All posts by mekineer (34)

topic: feed.php blank page  in the forum: General Help and Support Features and Functionality
Avatar
mekineer #1
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
This shows up in the error log:

[19-Feb-2020 00:23:14 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in /home/nerdonde/public_html/mekineer.com/feed.php:138
Stack trace:
#0 /home/nerdonde/public_html/mekineer.com/feed.php(26): rss_parseOptions()
#1 {main}
  thrown in /home/nerdonde/public_html/mekineer.com/feed.php on line 138
[19-Feb-2020 00:23:21 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in /home/nerdonde/public_html/mekineer.com/feed.php:138
Stack trace:
#0 /home/nerdonde/public_html/mekineer.com/feed.php(26): rss_parseOptions()
#1 {main}
  thrown in /home/nerdonde/public_html/mekineer.com/feed.php on line 138
[19-Feb-2020 00:23:21 UTC] PHP Fatal error:  Uncaught Error: Function name must be a string in /home/nerdonde/public_html/mekineer.com/feed.php:138
Stack trace:
#0 /home/nerdonde/public_html/mekineer.com/feed.php(26): rss_parseOptions()
#1 {main}
  thrown in /home/nerdonde/public_html/mekineer.com/feed.php on line 138

Line 138 in feed.php reads:         $opt[$name] = $INPUT->$val[0]($val[1], $val[2], true);

looking back at the function:

function rss_parseOptions() {
    global $conf;
    global $INPUT;

    $opt = array();

    foreach(array(
                // Basic feed properties
                // Plugins may probably want to add new values to these
                // properties for implementing own feeds

                // One of: list, search, recent
                'feed_mode'    => array('str', 'mode', 'recent'),
                // One of: diff, page, rev, current
                'link_to'      => array('str', 'linkto', $conf['rss_linkto']),
                // One of: abstract, diff, htmldiff, html
                'item_content' => array('str', 'content', $conf['rss_content']),

                // Special feed properties
                // These are only used by certain feed_modes

                // String, used for feed title, in list and rc mode
                'namespace'    => array('str', 'ns', null),
                // Positive integer, only used in rc mode
                'items'        => array('int', 'num', $conf['recent']),
                // Boolean, only used in rc mode
                'show_minor'   => array('bool', 'minor', false),
                // String, only used in list mode
                'sort'         => array('str', 'sort', 'natural'),
                // String, only used in search mode
                'search_query' => array('str', 'q', null),
                // One of: pages, media, both
                'content_type' => array('str', 'view', $conf['rss_media'])

            ) as $name => $val) {
        $opt[$name] = $INPUT->$val[0]($val[1], $val[2], true);
    }

    $opt['items']      = max(0, (int) $opt['items']);
    $opt['show_minor'] = (bool) $opt['show_minor'];
    $opt['sort'] = valid_input_set('sort', array('default' => 'natural', 'date'), $opt);

    $opt['guardmail'] = ($conf['mailguard'] != '' && $conf['mailguard'] != 'none');

    $type = $INPUT->valid(
        'type',
        array( 'rss', 'rss2', 'atom', 'atom1', 'rss1'),
        $conf['rss_type']
    );
    switch($type) {
        case 'rss':
            $opt['feed_type'] = 'RSS0.91';
            $opt['mime_type'] = 'text/xml';
            break;
        case 'rss2':
            $opt['feed_type'] = 'RSS2.0';
            $opt['mime_type'] = 'text/xml';
            break;
        case 'atom':
            $opt['feed_type'] = 'ATOM0.3';
            $opt['mime_type'] = 'application/xml';
            break;
        case 'atom1':
            $opt['feed_type'] = 'ATOM1.0';
            $opt['mime_type'] = 'application/atom+xml';
            break;
        default:
            $opt['feed_type'] = 'RSS1.0';
            $opt['mime_type'] = 'application/xml';
    }

    $eventData = array(
        'opt' => &$opt,
    );
    trigger_event('FEED_OPTS_POSTPROCESS', $eventData);
    return $opt;
}
topic: feed.php blank page  in the forum: General Help and Support Features and Functionality
Avatar
mekineer #2
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
Subject: feed.php blank page
My feed page isn't working.  I just have a blank white page.

Also, and perhaps more importantly, I'm using a plugin called log404 https://www.dokuwiki.org/plugin:log404
When I pull up the page for log404, from the admin page, I am forwarded to destinyfernandi.com, which forwards me to speakwithjohns.com, which I think pretends to be some robot captcha.

Update: I solved the issue of forwarding to destinyfernandi.com, but deleting log404.csv.  Apparently, it is a weakness of the log404 plugin.

feed.php still isn't working.
This post was edited on 2020-02-17, 04:35 by mekineer.
topic: Configuration:Useheading while IndexMenu shows Namespace  in the forum: General Help and Support Plugins
Avatar
mekineer #3
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 68252
I'm trying to change the code for the IndexMenu plugin.

So far, in syntax/indexmenu.php, I have removed the following code:

            if($conf['useheading'] == 1 || $conf['useheading'] === 'navigation') {
                $title = p_get_first_heading($id, FALSE);
            }

And have shortened the following function:

    private function _getTitle($ns, $headpage, &$hns) {
        global $conf;
        $hns   = false;
        $title = noNS($ns);
        return $title;
    }

For me, IndexMenu continues as if I had not made any changes... the useheading option still results in the title being used instead of the namespace.


For Dokuwiki, I tried removing the following code in inc/common.php:

        $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE);

Removed from the following section of code:

    // page names
    $name = noNSorNS($ID);
    if(useHeading('navigation')) {
        // get page title
        $title = p_get_first_heading($ID, METADATA_RENDER_USING_SIMPLE_CACHE);
        if($title) {
            $name = $title;
        }
    }

However, still no change in behavior.
This post was edited 2 times, last on 2020-02-05, 15:53 by mekineer.
topic: Configuration:Useheading while IndexMenu shows Namespace  in the forum: General Help and Support Plugins
Avatar
mekineer #4
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 68228
I edited the first post for clarity
topic: Configuration:Useheading while IndexMenu shows Namespace  in the forum: General Help and Support Plugins
Avatar
mekineer #5
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
Subject: Configuration:Useheading while IndexMenu shows Namespace
I would like the page titles, the ones that show up in the tab of a web browser, to be assigned by the first heading of the page.  I would also like IndexMenu to show the menu using the namespaces.  If I enable the UseHeading option, then IndexMenu shows the title instead of the namespace.

Is this possible for IndexMenu to show the namespace despite the UseHeading option, and how?  I try to read the IndexMenu instructions, and I can't understand anything.
This post was edited on 2020-01-29, 23:20 by mekineer.
topic: Citations in CSE/APA/MLA style with corresponding footnotes  in the forum: General Help and Support Features and Functionality
Avatar
mekineer #6
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
Subject: Citations in CSE/APA/MLA style with corresponding footnotes
I like the footnotes feature, but I was wondering if instead of having the footnote be referenced as a number, we can have an inline reference such as: (Doe et al 2018).

If not in the default syntax, is there a plugin?
topic: delimiter for acronym file  in the forum: General Help and Support Syntax and Usage
Avatar
mekineer #7
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 67026
I prefer the internal acronym function over the Explain plugin, for the following reasons:

I like the acronym style of the underlining.
I like the acronym style of tooltip.
I don't want an internal or external link.
I don't want the tooltip plugin, because I want the definition to be wiki-wide.

Basically, I want to change the acronym file delimiter from a whitespace to 4 whitespaces.  That is all.

So help me God, I'll use underscores for multi-word terms if I have to.
topic: delimiter for acronym file  in the forum: General Help and Support Syntax and Usage
Avatar
mekineer #8
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
Subject: delimiter for acronym file
Continuation of thread: https://forum.dokuwiki.org/thread/12967
Since some people are touchy about continuing an old thread.

Maybe there is a way to change the delimiter in acronyms.conf from a whitespace to something else, like 4 whitespaces.

Can someone who can read PHP see if the delimiter is in parser.php in this section:

class Doku_Parser_Mode_acronym extends Doku_Parser_Mode {
    // A list
    var $acronyms = array();
    var $pattern = '';

    function __construct($acronyms) {
        usort($acronyms,array($this,'_compare'));
        $this->acronyms = $acronyms;
    }

    function preConnect() {
        if(!count($this->acronyms)) return;

        $bound = '[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]';
        $acronyms = array_map('Doku_Lexer_Escape',$this->acronyms);
        $this->pattern = '(?<=^|'.$bound.')(?:'.join('|',$acronyms).')(?='.$bound.')';
    }

    function connectTo($mode) {
        if(!count($this->acronyms)) return;

        if ( strlen($this->pattern) > 0 ) {
            $this->Lexer->addSpecialPattern($this->pattern,$mode,'acronym');
        }
    }

    function getSort() {
        return 240;
    }

    /**
     * sort callback to order by string length descending
     */
    function _compare($a,$b) {
        $a_len = strlen($a);
        $b_len = strlen($b);
        if ($a_len > $b_len) {
            return -1;
        } else if ($a_len < $b_len) {
            return 1;
        }

        return 0;
    }
}

Or maybe this section of xhtml.php:

    function acronym($acronym) {

        if(array_key_exists($acronym, $this->acronyms)) {

            $title = $this->_xmlEntities($this->acronyms[$acronym]);

            $this->doc .= '<abbr title="'.$title
                .'">'.$this->_xmlEntities($acronym).'</abbr>';

        } else {
            $this->doc .= $this->_xmlEntities($acronym);
        }
    }
topic: Ajax.php under attack?  in the forum: General Help and Support General Stuff
Avatar
mekineer #9
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
Subject: Ajax.php under attack?
Awstats is telling me that some
Unknown robot identified by bot\*
is hitting my site 25K times this month.  I guess mainly going after my ajax.php file.  Any ideas?

[Image: http://mekineer.com/ajax.jpg]
topic: public subscription  in the forum: General Help and Support Features and Functionality
Avatar
mekineer #10
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66385
I am looking at the alternative of using RSS, but it looks like you can't subscribe to a single page.  But, apparently, you can subscribe to a namespace:
http://example.com/dokuwiki/feed.…?mode=list&ns=name…

Is there an automated way of including an RSS feed link at the top or bottom of every page in the wiki, referencing its own namespace?
topic: *.indexed files  in the forum: General Help and Support Features and Functionality
Avatar
mekineer #11
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66388
Yeah, thanks Andi.  Looks like everything is ok.
topic: URL rewrite for old link?  in the forum: General Help and Support Installation and Configuration
Avatar
mekineer #12
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66396
I would really like to substitute this, but it just doesn't work:
RewriteCond %{ENV:underscores} ^$
RewriteRule ^([^_]*)_+(.*)$ $1-$2  [QSD,N]
This post was edited on 2019-06-04, 12:01 by mekineer.
topic: URL rewrite for old link?  in the forum: General Help and Support Installation and Configuration
Avatar
mekineer #13
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66390

RewriteEngine on

RewriteBase /

RewriteRule ^dokuwiki/(.*)$ $1 [R=301,L]

RewriteCond %{QUERY_STRING} ^(id=)([^\:]*)\:(.*)$
RewriteRule $(.*)$ %2/%3 [E=underscores:Yes,QSD]

RewriteCond %{ENV:underscores} ^$
RewriteRule ".?" "-" [S=6]

RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5-$6-$7 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5-$6 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4 [QSD]
RewriteRule ^(.*)_(.*)_(.*)$  $1-$2-$3 [QSD]
RewriteRule ^(.*)_(.*)$  $1-$2 [QSD]

RewriteCond %{HTTP_HOST} ^mekineer\.nerdondemand\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC,OR]
RewriteCond %{https} off [OR]
RewriteCond %{ENV:underscores} ^Yes$
RewriteRule (.*) https://mekineer\.com/$1 [R=301,L]
This post was edited on 2019-06-04, 11:47 by mekineer.
topic: URL rewrite for old link?  in the forum: General Help and Support Installation and Configuration
Avatar
mekineer #14
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66341
RewriteCond %{REQUEST_URI} ^data/pages/(.*)$
RewriteRule  .?  -  [S=6]

This condition was never going to be met, so the underscore removal section would always happen.  I got around the worst of it by using (_?.+), but the underlying problem is still there.
This post was edited on 2019-06-04, 08:23 by mekineer.
topic: Invisible History Comparison View due to Font Color  in the forum: General Help and Support Installation and Configuration
Avatar
mekineer #15
Member since Mar 2018 · 34 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 61791
I'm using the adoradark theme.  I found the color references in the style sheet:
...\lib\tpl\adoradark\css\_diff.css
Close Smaller – Larger + Reply to this post:
Special characters:
Page:  1  2  3  next 
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-04-06, 04:23:59 (UTC +02:00)