View previous topic :: View next topic |
Author |
Message |
Sigg3
Joined: 03 Jul 2003 Posts: 779 Location: Oslo, Norway
|
|
Back to top |
|
 |
ambrosia
Joined: 17 Jun 2004 Posts: 2 Location: California
|
Posted: Thu Nov 11, 2004 6:37 pm Post subject: |
|
|
This works great, but I was wondering how can I edit the code so that those who aren't logged in (visitors) can view the list of commenters?
I already edited the script to remove the options to delete the comments and such, and I've made it so that it lists the commenter's name and url (which I wanted to do).  |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Thu Nov 11, 2004 9:49 pm Post subject: |
|
|
Just remove the lines
Code: | if (!($user_login)) exit;
if ($user_level<8) exit; |
|
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Fri Nov 12, 2004 3:35 am Post subject: |
|
|
...or you can use the Latest n Comments hack.  _________________ Michael P.
 |
|
Back to top |
|
 |
lynn
Joined: 04 Jul 2003 Posts: 63 Location: USA
|
Posted: Sun Nov 14, 2004 3:52 pm Post subject: |
|
|
I tried this. I get a 404 error when I click on the All Comments link. |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Sun Nov 14, 2004 4:05 pm Post subject: |
|
|
Are you replying to me rather than to Cyberian 75? If so, do you get the list of comments when you are logged in? If not, check you have put the correct file name in b2menutop.txt. If it's not that, can you paste the code here that you have for b2allcomments.php or whatever you called it? |
|
Back to top |
|
 |
lynn
Joined: 04 Jul 2003 Posts: 63 Location: USA
|
Posted: Sun Nov 14, 2004 5:03 pm Post subject: |
|
|
Whoever has the answer is fine with me. I used the instructions from the B2 Resource Center. I can't find anything that I've done wrong but I know there must be something. I don't get the list of comments. Nothing at all, just the 404 error page. |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Sun Nov 14, 2004 5:24 pm Post subject: |
|
|
Having been to your site I think I have found the problem. You have put b2allcomments.php in the b2-include folder. Move it to the b2 directory above and it should be fine.
Last edited by stevem on Sun Nov 14, 2004 5:46 pm; edited 2 times in total |
|
Back to top |
|
 |
lynn
Joined: 04 Jul 2003 Posts: 63 Location: USA
|
Posted: Sun Nov 14, 2004 6:08 pm Post subject: |
|
|
Ah... I had wondered about that. I didn't see anything in the instructions about where to put it so I put it in the same folder that b2menutop.txt is in.
I get the list now but when I try to delete a comment I get a dialog box that says "B2 could not be found. Please check the name and try again." |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Sun Nov 14, 2004 6:38 pm Post subject: |
|
|
That makes no sense at all since that message isn't part of b2. Can you delete individual comments on the usual edit page because that uses identical code? |
|
Back to top |
|
 |
lynn
Joined: 04 Jul 2003 Posts: 63 Location: USA
|
Posted: Sun Nov 14, 2004 8:22 pm Post subject: |
|
|
Yes, I spent an hour and half deleting spam this morning. |
|
Back to top |
|
 |
stevem
Joined: 15 Mar 2003 Posts: 323
|
Posted: Sun Nov 14, 2004 9:22 pm Post subject: |
|
|
Assuming you are using Internet Explorer, can you hover over one of the Delete Comment links, right-click, and select Copy Shortcut. Can you paste the result here?
When you click on Delete Comment do you get a dialog box which says "You are about to delete this comment by ... 'Cancel' to stop, 'OK' to 'delete'? |
|
Back to top |
|
 |
lynn
Joined: 04 Jul 2003 Posts: 63 Location: USA
|
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1267 Location: Oregon
|
Posted: Mon Nov 15, 2004 4:56 am Post subject: |
|
|
Change...
Code: | echo " [ <a href=\"$PHP_SELF?action=deletecomment&p=".$postdata["ID"]."&comment=".$commentdata["comment_ID"]."\" onclick=\"return confirm('You are about to delete this comment by \'".htmlentities($commentauthor)."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete Comment</a> ]"; |
To...
Code: | echo " [ <a href=\"$siteurl/$PHP_SELF?action=deletecomment&p=".$postdata["ID"]."&comment=".$commentdata["comment_ID"]."\" onclick=\"return confirm('You are about to delete this comment by \'".htmlentities($commentauthor)."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete Comment</a> ]"; |
_________________ Michael P.
 |
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 779 Location: Oslo, Norway
|
Posted: Mon Nov 15, 2004 9:24 am Post subject: |
|
|
Hmmm...
I got at least 50 new spams during the weekend. The strange thing about them, barely noticable, was that they wasn't posted in post-comments..!!
Quote: | ".. in [EMPTY] @ [EMPTY]" |
and the b2allcomments.php (re-named allissues) gave this:
+ Code: | http://www.sigg3.net/b2allissues.php?action=deletecomment&p=&comment=1012 |
There's no post number...! _________________ Sigg3.net - You know you're worth it! | b2 Cafelog Resource Center |
|
Back to top |
|
 |
|