News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ignore user

Started by dilaca, April 05, 2004, 11:57:21 PM

Previous topic - Next topic

Rudolf

#40
I worked some more on the mod and here is the result:

Ignore User 1.1

This is a whole new version, added a couple of stuff, fixed some serious bugs in the first one.   :-[
I added a beta to the name, to make it clear that it wasn't tested live. To avoid misunderstandings. ;)
Don't be mischieved by the name, it's compatible with any SMF since 1.0.3.

Here is a what's changed:
  Ignore user 1.1 - august 2005
+ Settings panel added for managing the ignore list in "Profile->Ignore User options" (!)
+ Buttons added for links (+4 images) (!)
+ Language file added (!)
+ Template file added (for the "Ignore options" page)
+ Fixed bugs in the 'ignore' system
+ Fixed errors in the table creation procedure, the installer fixes the already existing tables (if there is need)
+ Optimized some code and the installation
+ Cleaned up files

If you're already using the 1.0 I recommend upgrading as soon as possible. ;)
I am trying to submit it on the SMF site too, maybe soon it will show up in the official section.  :-\

Edit: Actually now i'm experienceing some problems with 1.0.5-. Weird

Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Rudolf

Ok I solved it and it should work.
The problem was with the uninstallation in 1.0.5.
I installed and uninstalled tens of times on both 1.0.5 and 1.1, and even 1.0.3, everything seems ok.  :)
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

snork13

for some reason i get "Error: Cannot install - please verify you put this in the same place as SMF's index.php." but it's in the /forum root with index.php? I'm confused.

-snork
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Rudolf

Are you trying to install it through the Package Manager?
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

snork13

#44
Quote from: rudiksz on August 31, 2005, 03:10:07 PM
Are you trying to install it through the Package Manager?

no, I'm heavy modded, i never use the package manager and I'm trying direct through URL...i made all the file changes just find manually, just need to add the database

thanks

snork

edited to add: so i just used phpadmin and had to change the syntax to work too, i use the default table smf_ 

CREATE TABLE  `smf_ignore` (`ID_MEMBER` MEDIUMINT( 8 ) UNSIGNED NOT NULL , UNIQUE (ID_MEMBER), `ignore_list` MEDIUMTEXT)
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Rudolf

ok, then
The modifications in the source files are really simple. The ones in the template file that are a bit more serious.
  *Every* code added by me is or before or after an SMF comment line. That should make spotting the places where they should go easier.
   Good luck.

Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

snork13

@rudiksz

thanks for the mod, the members love it, works well!

-snork
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

zmobie

Thank you for the mod.  Got some happy users as a result.

I found a couple errors, figured I'd contribute back :)

I got errors from Display.template.php from the following two lines:
document.getElementById("showhide"+msgnr).alt = "', $txt['ignore_show'] ,'";
document.getElementById("showhide"+msgnr).alt = "', $txt['ignore_hide'] ,'";

$txt['ignore_show'] and $txt['ignore_hide'] weren't defined in Ignore.english.php, so I added :
$txt['ignore_show'] = 'Show Post';
$txt['ignore_hide'] = 'Hide Post';

That made that part happy.

The next issue I ran into was related to the use of stripos() in Ignore.php.  Seems that's a php5 only function.  More info on stripos at hxxp:us2.php.net/stripos [nonactive]

I added the following to Ignore.php.  Not sure if that's the best way:
if(!function_exists('stripos'))
{
   function stripos($haystack,$needle,$offset = 0)
   {
     return(strpos(strtolower($haystack),strtolower($needle),$offset));
   }
}


The last buglet is something that shows up in my forum error logs.  Couldn't get past this one:
8: Undefined offset: 326
File: /home/www/htdocs/smf/Themes/default/languages/Ignore.english.php (eval?)
Line: 29


Any ideas?  My next step is to try and find an easy way to add this into other themes.

Thanks!

Rudolf

Thanks a lot for the feedback.

  I already fixed the first error, just some values missing that were producing annoying warning messages in logs.  ;)
  Turned out that the problem with the "undefined offset" was similar. Both of them are fixed now.

  Indeed the stripos is php5 only, and I clearly remember changing it back to strpos. Maybe it was another script for an other thing.  :-\
  I'm not that good in php, but seems like your solutions is very cool, so I adopted it. Good for "forward" compatibility. ;)

  I updated the package, which is available since some time on the SMF site as well. LINK



!!! I'll put here the two changed files temporarily for those who want to update their mods. It's enough if you simply copy/overwrite the new files on the old ones. No need for the package manager.
  Ignore.php   <- into /Sources dir
  Ignore.english.php <- into /Themes/default/languages  dir



Adding to other themes shouldn't be so hard. Everything is between "IGNORE" comments. At least finding what you have to add shouldn't be a problem. Remains only to figure out where to add in the new themes. ;)

Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

zmobie

Cool, thanks!  The stripos replacement came from hxxp:php.net [nonactive], I claim no credit for it. :)

Unfortunately, I'm unable to download the .zip from mods.simplemachines.org.  Weird.

Anyways, one last buglet.  Line 150 of Ignore.php:
      db_query("INSERT INTO {$db_prefix}ignore (ID_MEMBER, ignore_list) VALUES ($ID_MEMBER, CONCAT('{$guest}', $_POST[post_ignore_list]'))", __FILE__, __LINE__);

needs an extra quote:
      db_query("INSERT INTO {$db_prefix}ignore (ID_MEMBER, ignore_list) VALUES ($ID_MEMBER, CONCAT('{$guest}', '$_POST[post_ignore_list]'))", __FILE__, __LINE__);

Rudolf

Weird that you can't download. You're not the first one saying it.
I tested the link myself after I uploaded the file, and it works for me. (in FireFox  ::) )
You can still download from my links. I updated the ones in the previous posts.
Maybe the forum admins can tell what's wrong?

Bug squashed ... erm, I mean ... fixed. ;)

Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

gri

Quote from: rudiksz2. Create copy of the online forum on your local computer.
An *exact* copy, as it is online with mods you might have installed.

Rudolf,
explain please the appointment
of the file "/attachments/.htaccess"
in the original installation archive
(it has really no name, extention only).

It is not being uploaded to the server.
What to do with it ?

Rudolf

   All I know about that file is that it's the configuration file for Apache. Don't know much about the syntax and what the things mean inside. Well, they are pretty self explanatory anyway.
   If your host it's not using Apache as web server you won't need that file.

   If you continue to have problems with the folder permissions it's better you contact you host.  ::)
Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

gri

Quote from: rudiksz on September 11, 2005, 11:37:09 PM
If you continue to have problems with the folder permissions
it's better you contact your host.  ::)

Rudolf,
the hoster has agreed with the discovered error
of permission management restrictions on the host..
and promissed to fix it.

Unfortunately this hoster is located
on the territory of Russian Federation..

gri

#54
Quote from: "url=http://geteven.vi-host.ru/index.php?topic=56.msg162#msg162]rudiksz in ~(Ignore User posts)~,
geteven.vi-host.ru/msg162
[/url]"]
That should do the trick.

@Copyright2005 { G.A.Antchugov &
Rudolf,

thank you for your assistances.
I have requested the formal owner of the forums
for the permission.. to pass words with passwords to your name.
Let be patient waiting for his opacity calls
from the office.

Many problems result from the fact
that the Russian Federation
has the slavery state tending
forms..
in every-every thing.

Let be patient in withstanding..
although our lives have become so short, frail and thin
during the last 20 years long increasing terror act.

How we are tired from these dances..
of the Death Spirit
hardly having the Humanity mission
as an aim.

In spite of all obstacles
which oppress people down the ground surface -
I am against moderation !

Having faced it face to face
I will rather spear it
twice..
voting with both hands for the "Ignore"
and will not forgive
neither for ".txt" nor ".php" nor ".htaccess" files nor..
for ".gif" !

Let these lines be observed publicly and not vice
versa,
let all people know why Earth Grivitation was a..
Human'S Pace.

}

Rudolf

I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

gri

Quote from: rudiksz on September 09, 2005, 05:10:15 AM
I updated the package, which is available since some time on the SMF site as well. LINK

rudiksz,
the download of the mod you have last LINKed on September 9,
http://mods.simplemachines.org/index.php?mod=185
still does not work.

Add below that LINK
your alternative link to the original Ignore_1-1.zip
  with the same updated package
   to download it from..
on case SMF_mod_download_page_inoperability will prolong.

Rudolf

  I see the mod is approved now, if the links still doesn't work for some reason you can d/l from the links in this topic(previous messages). They are updated to the very latest version.
  Anyway, now it should work, there are 6 downloads so far.  :-\
Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

gri

Quote from: rudiksz on September 12, 2005, 11:04:55 PM
  I see the mod is approved now,

rudiksz,

1. now the mod have downloaded.

2. What does "[1][1]" mean in the file name ?

3. In readme.html file modify version number from 1.0 to 1.1.

4. On the download page there is a correct link
   to the topic "Ignore User"
   http://www.simplemachines.org/community/index.php?topic=49149.0
   which has the Author of the topic
   equal to the Author of the Mod.
   The download page and the Head topic should be titled differently.
   For example "Mod: Ignore User" for the download page.

4. As far as I can imagine
   the correct scheme of work management around the mod..

    the ~Upper Head~ topic of the Author of the Mod
     should be Locked from others' posts
     and simultaneously it should be transparent
      for the Author's new posts and modifications
       without the necessity of Unlocking it
        each time the Author actualise his locked topic.
   ( I have already requested such a feature
     http://agreetogri.newmail.ru/return-back.htm .)
   
   The upper topic is for the actual declarations and guides
    from the Author only (or from a set of predefined co-authors)
    and is not intended for general discussions.

   Inside your Upper Locked topic there should be included
   a list of links to other discussion topics
    on various aspects of the Mod implementation
   having been distributed over the planet.

   Surely the list of links to the bounded topics
    can be increased or modified in time
     at the discretion of the Author (or his follower),
   but in any case independently from the
    aspects of discussion having been already suggested..
   the Author should have the linked topic
    for any public incoming notices for free _public_ feedback.

   Free incoming notices are the motives for the Author
    for creating new links to discussions
     on still not suggested aspects
    and for the improvement of the Head topic.

   Posting recommending links to the Users -
    that is the management
     which allow Users not to abuse the Ignore Mod possibilities.

mohoganybrwn

I was wondering how I can change the coding manually?  Because I tried to install this mod via the Package manager, but I get the following:


Advertisement: