• [MOD] Ban v1.7 3 0 5 1
Currently:  

Author Topic: [MOD] Ban v1.7  (Read 357388 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #255 on: November 22, 2008, 08:10:18 PM »
Hello and welcome to 4images forum.

how i can set a ban link on user profile !?  So when i (like administrator) go on some user profil and click a ban link, new windows should be open in control napel.. so i have automactly set a ban on user nick or ip...
The simplest way is add this in member_profile.html template:
Code: [Select]
{if is_admin}
<a href="
<?php
global $site_sess$user_row;
echo 
$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("plugins/ban.php?action=form&user_id={user_id}&name={user_name}&email=".$user_row['user_email']."&type=3"));
?>

">Ban this user</a>
{endif is_admin}

I need something like... when i on control napel click on ban link, and have link above "Who's online ?" when i click on this link, i see online users and BAN link, so if i click on ban i can ban a user without typing anything... !?
Yes, you don't need type anything, however, by clicking on that link it doesn't ban anyone, it only fills up the ban form for you. At that stage you can change type of the ban, set date, reason and message, all that is optional. But you still need click "Add" button at the bottom to save the ban.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline komsho24

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: [MOD] Ban v1.7
« Reply #256 on: November 23, 2008, 01:23:14 AM »
V@no thank you very mach !

Offline komsho24

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: [MOD] Ban v1.7
« Reply #257 on: November 23, 2008, 01:37:31 AM »
V@no just one more thing..


Now i set a code on my way... it's

...
          <td class="row1"><A STYLE="text-decoration:none" a href=" <?php global $site_sess, $user_row; echo $site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("plugins/ban.php?action=form&user_id={user_id}&name={user_name}&email=".$user_row['user_email']."&type=4"));?>"><b>BAN USER</b></a>
...

So how i can set, when click on BAN USER link, to have a new window open? Something like <target="_blank"> ?

Thank you

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #258 on: November 23, 2008, 01:45:10 AM »
First of all, in HTML it doesn't matter if its in one line or on multi lines, but multiline - sure easy to read ;)
Secondly, I don't know what effect it does on the result, but this is wrong:
Code: [Select]
<A STYLE="text-decoration:none" a href="it should be:
Code: [Select]
<A STYLE="text-decoration:none" href="
and finally, just insert target="_blank" in front of href= (note, no < >)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline komsho24

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: [MOD] Ban v1.7
« Reply #259 on: November 25, 2008, 02:54:42 AM »
V@no thank you !

Offline amboutwe

  • Pre-Newbie
  • Posts: 5
    • View Profile
    • Tim And Angi
Re: [MOD] Ban v1.7
« Reply #260 on: February 02, 2009, 04:39:55 AM »
Thank you a million times over. Every time I think of something that I would like in 4images, you have a perfectly executed mod just waiting for me. I cannot thank you enough for all the mods you have created over the years.
--
Angi

Offline DJKat

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Ban v1.7
« Reply #261 on: December 03, 2009, 11:03:08 PM »
Hi there!
Started installing this MOD and came till the point where I should start ban_install.php.
There I get only an empty browser window with no text nor any error message.
Any hint?

Dany

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #262 on: December 04, 2009, 01:15:12 AM »
Try add below
include(ROOT_PATH.'global.php');

This:
error_reporting(E_ALL);
ini_set("display_errors"1);


And see if any error messages showed

P.S. you must be logged in as administrator.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline DJKat

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Ban v1.7
« Reply #263 on: December 04, 2009, 10:49:45 AM »
Did all steps again and now it works...
What ever the reason may be.  :roll:

Thanks V@no for helping and creating this great MOD!  :mrgreen:

Offline kettwiesel

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] Ban v1.7
« Reply #264 on: February 23, 2010, 03:27:13 AM »
German / Deutsch
Wenn man alles Punkt für Punkt, genau so macht wie beschrieben klappt das 100 %tig bei den XX muss man 7 eintragen, das ist die einzige Stolperstelle

und um das ganze zu toppen, habe ich meine BB Codes Begrenzt. Nur noch *.jpg und *.gif zugelassen

details.php

Code: [Select]
));
//-----------------------------------------------------
//--- ImageCodes v1.0 Begins --------------------------
//-----------------------------------------------------

// Mod: ImageCodes v1.0
// Version: 1.0
// Description : Get image path, link and bbcode on the details page
// Contact: arjoon@gmail.com
// Last update: June 30 2007

$sql = "SELECT image_media_file FROM ".IMAGES_TABLE." WHERE image_id= $image_id";
$image_codes = $site_db->query_firstrow($sql);

$new_name = $image_codes['image_media_file'];

      $uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
      $uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;
      $uploaded_image_link = $script_url."/details.php?image_id=".$image_id;
      $uploaded_thumb_hotlink = "<a href=\"".$uploaded_image_link."\"><img src=\"".$uploaded_thumb_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
      $uploaded_image_hotlink = "<a href=\"".$script_url."\"><img src=\"".$uploaded_image_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
      $uploaded_image_bbcode = "[URL=".$script_url."][IMG]".$uploaded_image_path."[/IMG][/URL]";
      $uploaded_thumb_bbcode = "[URL=".$uploaded_image_link."][IMG]".$uploaded_thumb_path."[/IMG][/URL]";
      $uploadinfo .= "<font size='2' face='Tahoma'><b>Bilder Codes einbinden:</b><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_hotlink."' type='text' name='image'> Vorschaubild für Webseiten<br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_bbcode."' type='text' name='image'> Vorschaubild Für Forums<br /><br />";
      $uploadinfo .= "<font size='1' face='Tahoma'>Benutze diesen Code für volle Größe für Foren und Webseiten</font><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_hotlink."' type='text' name='image'> für Webseiten<br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_bbcode."' type='text' name='image'> Webseiten und Forums<br /><br />";
      $uploadinfo .= "<font size='1' face='Tahoma'>Privater Link für e-Mails oder als reinen Link</font><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_link."' type='text' name='image'> Reiner Hyper Textlink<br />";
      
      $icodes .= "<table border=\"0\" width=\"500px\" align=\"center\">\n<tr>\n<td>\n".$uploadinfo."\n</td>\n</tr>\n</table>\n";

      $site_template->register_vars("image_codes", $icodes);

//-----------------------------------------------------
//--- end of ImageCodes v1.0 --------------------------
//-----------------------------------------------------
$site_template->print_template($site_template->parse_template($main_template));
include(ROOT_PATH.'includes/page_footer.php');
?>

und der Rechtsklick eingeschaltet und erweitert.

header.html

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}">
<head>
<title>{prepend_head_title}{site_name}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}">
<meta name="description" content="{detail_meta_description}{site_name}">
<meta name="keywords" content="{detail_meta_keywords}">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="10 days">
<meta http-equiv="imagetoolbar" content="no">
<link rel="stylesheet" href="{template_url}/style.css" type="text/css">
<link rel="shortcut icon" href="{home_url}favicon.ico">
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}">
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />
</head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
{if has_rss}
{endif has_rss}
<script type="text/javascript">

function highlight(field) {
        field.focus();
        field.select();
}
</script>

<script language="javascript" type="text/javascript">
<!--

  var captcha_reload_count = 0;
var captcha_image_url = "{url_captcha_image}";
  function new_captcha_image() {
    if (captcha_image_url.indexOf('?') == -1) {
 document.getElementById('captcha_image').src= captcha_image_url+'?c='+captcha_reload_count;
} else {
 document.getElementById('captcha_image').src= captcha_image_url+'&c='+captcha_reload_count;
}

    document.getElementById('captcha_input').value="";
    document.getElementById('captcha_input').focus();
    captcha_reload_count++;
  }

function opendetailwindow() {
    window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
  }
  
  function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
      alert("© Copyright by {site_name}");
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
      alert("© Copyright by {site_name}");
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

document.oncontextmenu = new Function("alert('© Copyright by {site_name} War wohl nix was? mit Bilderklau??? ;-) Wenn du das Bild verlinken möchtest, klicke auf das Bild deiner Wahl. Es erscheint der Code zum kopieren. Klicke auf den Code den du brauchst. Der ausgewählte Code wird Blau. Klicke in deinem Browser auf Bearbeiten / Kopieren. Der Code ist dann in der Zwischenablage. Wechsel nun zu der Seite wo du den Code einbinden willst. Rechte Maustaste auf der Seite wo du das Bild Einfügen willst. Das wars. Wers immer wieder Probiert dem Sperre ich seine IP Adresse Kapie !');return false");

// -->
</script>

{if has_rss}
{endif has_rss}
<div id="container">
<p>
<br />

Dann habe ich 2 bereiche eingerichtet
1. Bilder Öffentlich für alle
2. Bilder Mitglieder nur für angemeldete Benutzer sichtbar.

schaut euch einfach meine Seite an, un probier als gast einfach ein wenig herum, dann wisst ihr genau was ich meine ;-)

xxx: rockballads. cwsurf. de/forum/4images/
« Last Edit: February 23, 2010, 06:48:08 AM by V@no »

Rembrandt

  • Guest
Re: [MOD] Ban v1.7
« Reply #265 on: February 23, 2010, 05:11:40 PM »
Hi!
....
und der Rechtsklick eingeschaltet und erweitert....
das "war wohl nix mit bilderklau...." kannst du vergessen.
mit linker maustaste, kannst du das bild in eine neue registerkarte verschieben.

versuche mal  <body  onselectstart="return false" ondragstart="return false"
      oncontextmenu="return false" oncontext="return false">

mfg Andi

Offline Jakarta

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Ban v1.7
« Reply #266 on: April 08, 2010, 04:02:09 PM »
hey i installed this mod and its working but there is a problem : i can't see the text in admin cpanel
im using 4images 1.7.7 can you help me please?

image in attachment
-------------------------------------
-Making 4images templates upon request!
-Converting HTML templates to work with 4images!
-------------------------------------

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #267 on: April 09, 2010, 02:08:58 AM »
Hello and welcome to 4images forum.


Re-do step 5 and make sure you follow the additional instructions posted at the end of that step.

Replace XX with the number u were supposed to memorize from Step 1
Quote
/*-- Setting-Group XX --*/
$setting_group[XX]="Ban";
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jakarta

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Ban v1.7
« Reply #268 on: April 09, 2010, 08:57:08 PM »
oh yeah i don't know how i skipped this step...

thanks V@no your the best!
-------------------------------------
-Making 4images templates upon request!
-Converting HTML templates to work with 4images!
-------------------------------------

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Ban v1.7
« Reply #269 on: May 23, 2010, 07:26:00 PM »
It's work thank you.
But the spammer can post a comment in details. I have a spam attack, they are in my ban list. But they continue with the spam.
It must they search images outside my website and then they spam them. What could I do? I am tired. I saw the control panel to desactivate comments for visitors but i dont see that choice.  :cry:
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more