does such a plugin exist? (news send in by users)

Creating and modifying plugins.
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

garvinhicking wrote:Hi!
but how can i update serendipity without the knowing of the visitors that i am doing this ...
You can't. But an update maybe takes a minute, during which you can setup a notice that upgrade is in progress.
How can i setup a notice that upgrade is in progress?
I know there is an notice...but in this notice is a link to the serendipity_admin.php abd i don´t want this! How can i remove it? (or completly edit the notice-page?)
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

now i have updated serententipity to the latest nightly version but the plugin "Kategorie als Startseite" doesn´t work! i have reinstalled it, and choosed a category at "Versteckte Kategorien" and saved it...but the category is already at the mainpage! What shall i do?

(sorry for absolutly bad english!)
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

The only thing I can imagine at this point: incorrect category ID. If you hover over a link in the Category sidebar, it'll include the category ID. Verify that the entries you're seeing are in fact from the ID you're trying to hide.

If they are, try hiding some other categories and see what happens.

Oh... perhaps there's a problem with multiple categories? Are your entries only in a single category, or could they be displayed because they're also in some non-hidden category?
Judebert
---
Website | Wishlist | PayPal
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

judebert wrote:The only thing I can imagine at this point: incorrect category ID. If you hover over a link in the Category sidebar, it'll include the category ID. Verify that the entries you're seeing are in fact from the ID you're trying to hide.

If they are, try hiding some other categories and see what happens.

Oh... perhaps there's a problem with multiple categories? Are your entries only in a single category, or could they be displayed because they're also in some non-hidden category?
I just want to hide a single category, and i don´t have to put in a category ID because there is a drop down menu;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi bailey!

That is strange; other users on this forums are using the plugin without any problems.

So if you're absolutely sure you configured it right and selected the right category to show, we'll need to inspect the SQL query that is created on your blog.

Since you don'T want to share your FTP access, you'll need to do this:

1. Edit your include/functions_entries.inc.php file
2. Search for the serendipity_fetchEntries() function
3. Look for this code:

Code: Select all

    if (is_string($ret)) {
        die("Query failed: $ret");
    }
Modify this to:

Code: Select all

    echo "BAILEY: $query<br />\n";
    if (is_string($ret)) {
        die("Query failed: $ret");
    }
4. Save the file. Go to your blog on the startpage and look for the output of that SQL query. Copy and paste that query here on the forums.
5. Undo your changes to the file so that your blog won't appear "broken".

With that SQL output I should be able to see what's happening.

Before you do all of that, you might want to check if you are using the latest version of the startcat plugin. It is 1.1...

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

garvinhicking wrote:Hi bailey!

That is strange; other users on this forums are using the plugin without any problems.

So if you're absolutely sure you configured it right and selected the right category to show, we'll need to inspect the SQL query that is created on your blog.
yes i´m sure, but there is not much to configure :?:
garvinhicking wrote: 4. Save the file. Go to your blog on the startpage and look for the output of that SQL query. Copy and paste that query here on the forums.
i have done it, but there was no output to see on the startpage! just the normal content...
garvinhicking wrote: Before you do all of that, you might want to check if you are using the latest version of the startcat plugin. It is 1.1...
yes...you already said that, i´m using version 1.1 of "Kategorie als Startseite"!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi bailey!
garvinhicking wrote: 4. Save the file. Go to your blog on the startpage and look for the output of that SQL query. Copy and paste that query here on the forums.
i have done it, but there was no output to see on the startpage! just the normal content...
That cannot be. You modified the file wrong then. Show me what you changed exactly, use a service like http://nopaste.php-q.net/.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

garvinhicking wrote:Hi bailey!
garvinhicking wrote: 4. Save the file. Go to your blog on the startpage and look for the output of that SQL query. Copy and paste that query here on the forums.
i have done it, but there was no output to see on the startpage! just the normal content...
That cannot be. You modified the file wrong then. Show me what you changed exactly, use a service like http://nopaste.php-q.net/.

Best regards,
Garvin
I have edited the file [main]/include/functions_entries.inc.php

like you said...

here is the code:
http://nopaste.php-q.net/185044
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Also wenn Du in den HTML-Quelltext deiner Seite guckst, steht die SQL-Abfrage da wie geforderrt drin:

Code: Select all

SELECT 
                    

                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,

                    a.realname AS author,
                    a.email

                    , e.body, e.extended
                    
                FROM
                    serendipity_entries AS e
                    LEFT JOIN serendipity_authors a
                        ON e.authorid = a.authorid
                    LEFT JOIN serendipity_entrycat ec
                        ON e.id = ec.entryid
                    LEFT JOIN serendipity_category c
                        ON ec.categoryid = c.categoryid
                     LEFT JOIN serendipity_authorgroups AS acl_a
                                   ON acl_a.authorid = 0
                            LEFT JOIN serendipity_access AS acl_acc
                                   ON (    acl_acc.artifact_mode = 'read'
                                       AND acl_acc.artifact_type = 'category'
                                       AND acl_acc.artifact_id   = c.categoryid
                                      )
                    WHERE isdraft = 'false' AND e.timestamp <= '1137429602' AND     (
                                 c.categoryid IS NULL
                                 OR ( acl_acc.groupid = 0)
                                 OR ( acl_acc.artifact_id IS NULL
                                      
                                    )
                               )
                    GROUP BY e.id
                    ORDER BY timestamp DESC
                     LIMIT 15
In dieser Abfrage fehlt die Einschränkung der s9y Kategorie!

Ich habe anhand deines Codes dankenswerterweise herausfinden können, dass dies NICHT die Datei von Serendipity 1.0-alpha2 ist. Die hast du also wohl überschrieben. Dann ist das kein Wunder, dass das Feature nicht funktioniert.

Grüße,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

garvinhicking wrote:Also wenn Du in den HTML-Quelltext deiner Seite guckst, steht die SQL-Abfrage da wie geforderrt drin:

Code: Select all

SELECT 
                    

                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,

                    a.realname AS author,
                    a.email

                    , e.body, e.extended
                    
                FROM
                    serendipity_entries AS e
                    LEFT JOIN serendipity_authors a
                        ON e.authorid = a.authorid
                    LEFT JOIN serendipity_entrycat ec
                        ON e.id = ec.entryid
                    LEFT JOIN serendipity_category c
                        ON ec.categoryid = c.categoryid
                     LEFT JOIN serendipity_authorgroups AS acl_a
                                   ON acl_a.authorid = 0
                            LEFT JOIN serendipity_access AS acl_acc
                                   ON (    acl_acc.artifact_mode = 'read'
                                       AND acl_acc.artifact_type = 'category'
                                       AND acl_acc.artifact_id   = c.categoryid
                                      )
                    WHERE isdraft = 'false' AND e.timestamp <= '1137429602' AND     (
                                 c.categoryid IS NULL
                                 OR ( acl_acc.groupid = 0)
                                 OR ( acl_acc.artifact_id IS NULL
                                      
                                    )
                               )
                    GROUP BY e.id
                    ORDER BY timestamp DESC
                     LIMIT 15
In dieser Abfrage fehlt die Einschränkung der s9y Kategorie!

Ich habe anhand deines Codes dankenswerterweise herausfinden können, dass dies NICHT die Datei von Serendipity 1.0-alpha2 ist. Die hast du also wohl überschrieben. Dann ist das kein Wunder, dass das Feature nicht funktioniert.

Grüße,
Garvin
lol du hast auf deutsch geschrieben :D

and what should I do now?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
lol du hast auf deutsch geschrieben :D
Whoops, I didn't notice :)
and what should I do now?
Think about it. What would be a wise thing to do? It's all there in front of you, just think about it :)

Helping is also "helping to think on your own behalf". :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bailey87
Regular
Posts: 72
Joined: Sun Dec 04, 2005 12:26 pm

Post by bailey87 »

garvinhicking wrote:Also wenn Du in den HTML-Quelltext deiner Seite guckst, steht die SQL-Abfrage da wie geforderrt drin:

Code: Select all

SELECT 
                    

                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,

                    a.realname AS author,
                    a.email

                    , e.body, e.extended
                    
                FROM
                    serendipity_entries AS e
                    LEFT JOIN serendipity_authors a
                        ON e.authorid = a.authorid
                    LEFT JOIN serendipity_entrycat ec
                        ON e.id = ec.entryid
                    LEFT JOIN serendipity_category c
                        ON ec.categoryid = c.categoryid
                     LEFT JOIN serendipity_authorgroups AS acl_a
                                   ON acl_a.authorid = 0
                            LEFT JOIN serendipity_access AS acl_acc
                                   ON (    acl_acc.artifact_mode = 'read'
                                       AND acl_acc.artifact_type = 'category'
                                       AND acl_acc.artifact_id   = c.categoryid
                                      )
                    WHERE isdraft = 'false' AND e.timestamp <= '1137429602' AND     (
                                 c.categoryid IS NULL
                                 OR ( acl_acc.groupid = 0)
                                 OR ( acl_acc.artifact_id IS NULL
                                      
                                    )
                               )
                    GROUP BY e.id
                    ORDER BY timestamp DESC
                     LIMIT 15
In dieser Abfrage fehlt die Einschränkung der s9y Kategorie!

Ich habe anhand deines Codes dankenswerterweise herausfinden können, dass dies NICHT die Datei von Serendipity 1.0-alpha2 ist. Die hast du also wohl überschrieben. Dann ist das kein Wunder, dass das Feature nicht funktioniert.

Grüße,
Garvin
okay i have overwrite the functions_entries.inc.php with the version of the 1.0-alpha2, but nothing happens ...the category i want to hide, doesn´t want to hide... :(
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Now that you've uploaded the file again in the right version, do the changes I asked you for again, post it again and we'll go from there.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply