Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by dabean dabean is offline
Developer Last Online: Dec 2003 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-19-2001 Last Update: Never Installs: 33
 
No support by the author.

Signature Image Management System (file based)

Updated: 27 June 2002, 12:22 AM BST

This hack allows users to upload a image or images that they can then use as part of the thier signature. All uploaded images are private to the user that uploaded them.

The hack requires that you have PHP 4.1.0 or newer for the upload functions to work correctly. PHP 4.0.6 can be used with modifications (not recommended).

The scripts can if enabled also prevent users from externally linking to the images they uploaded, please note this is done by HTTP_REFERER checking not all http servers or browsers support this however is more widely supported than Apache's mod_rewrite. Should you wish to stop deep linking then upload a image called badcontent.gif to your forums directory.

Further more instructions are provided in how to get this hack to work if you are using vBulletin's standard sig editor or a advanced sig editor hack.

Version 2.0 Updates
- remote storage support
- sig.php nolonger appears in online.php
- special [sig] vB code is used instead of [img] tags

Version 1.3 Updates
- fixed display bug
- added removal script to main package
- added test template set


Version 1.11 Updates
- Image width & height checking
- Extension checking
- More useful error messages
- Added a missing function

Current Version 1.3
Released 20th sept 2001

Requirements:
- vBulletin 2.0.3
- PHP 4.0.3+ (this hack has not been tested on PHP 3.0.17, it may or may not work)

Optional:
- HTTP Server that supports HTTP_REFERER, (Apache 1.2+, IIS 4+)
- badcontent.gif in your forum directory


Screenshots can be found in the zip file.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #152  
Old 07-29-2002, 06:22 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i sorted it now last night but was tired and went bed.
Just like to say a big thanks m8 - sometimes though when one is stuck it just seems easier to do a post than to actually find out what the prob was and when i finally did it - i was mega p***ed as it was all to do with the path.

Excellant hack m8 and one that im sure a lot of use are glad u made.
Reply With Quote
  #153  
Old 09-02-2002, 04:02 AM
CRego3D CRego3D is offline
 
Join Date: May 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Instaleld this hack .. using the latest .zip .. everythign works, I can upload the images, I see them in the User CP, I click on it, it does do [sig=6] (6 beeign that sig number I supose) ..

but when I click on "submit modifications" .. I get

Parse error: parse error in /hsphere/local/home/yaxay/yaxay.com/yack/admin/functions.php(821) : regexp code on line 1

Fatal error: Failed evaluating code: in /hsphere/local/home/yaxay/yaxay.com/yack/admin/functions.php on line 821

Any ideas ?

PS - Line 821 is ..

$bbcode=preg_replace($searcharray, $replacearray, $bbcode);
Reply With Quote
  #154  
Old 09-02-2002, 09:47 AM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by CRego3D
Instaleld this hack .. using the latest .zip .. everythign works, I can upload the images, I see them in the User CP, I click on it, it does do [sig=6] (6 beeign that sig number I supose) ..

but when I click on "submit modifications" .. I get

Parse error: parse error in /hsphere/local/home/yaxay/yaxay.com/yack/admin/functions.php(821) : regexp code on line 1

Fatal error: Failed evaluating code: in /hsphere/local/home/yaxay/yaxay.com/yack/admin/functions.php on line 821

Any ideas ?

PS - Line 821 is ..

$bbcode=preg_replace($searcharray, $replacearray, $bbcode);
What PHP version?

Check,
PHP Code:
"/vbscript:/si",
"/(\[sig\=)(.*)(\])/esiU" // addition 
exists as stated in the readme. (functions.php)

Check
PHP Code:
"vbscript :",
"checksigimage('\\2')" // addition 
exists also as stated in the readme. (functions.php)

Check the function "checksigimage" exists within functions.php.
Reply With Quote
  #155  
Old 09-02-2002, 03:56 PM
CRego3D CRego3D is offline
 
Join Date: May 2002
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you .. As it seems I furgot somethign on functions.php .. works great now
Reply With Quote
  #156  
Old 09-02-2002, 09:38 PM
LancerForums's Avatar
LancerForums LancerForums is offline
 
Join Date: Nov 2001
Location: CA
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great hack! I think there's one bug though:

I just installed v.2.0.4b and everything worked except deleting the image from the image sig list. The delete appeared successful, but when I checked the folder it was still there. It turns out imageid was missing from the query for the image info when deleting an image. The code I had looks like this:

simage.php

Code:
// ############################  delete sig image #############################
if ($HTTP_GET_VARS['action']=="remove") {

  include("./global.php");

  if ($bbuserinfo['userid']==0){
    show_nopermission();
    exit;
  }

  if (is_numeric($HTTP_GET_VARS['imageid'])) {
    // delete file
    $sigimage = $DB_site->query_first("SELECT extension, userid, location FROM sigimage WHERE imageid = $HTTP_GET_VARS[imageid]");
    if ($sigimage['userid'] == $bbuserinfo['userid']) {
      // local location lets remove it.
      if ($sigimage['location']==0) {
        // can delete image
        @unlink($sigimagedir ."/uid". $bbuserinfo[userid] ."iid". $sigimage['imageid'] .".". $sigimage['extension']);
        // delete entry
      }
      $DB_site->query("DELETE FROM sigimage WHERE imageid=$HTTP_GET_VARS[imageid] AND userid=$bbuserinfo[userid]");

      $goto="simage.php?s=$session[sessionhash]&action=alterimg";
    eval("standardredirect(\"".gettemplate("redirect_imagedelete")."\",\"$goto\");");
    } else {
      // no permission
      show_nopermission();
      exit;
    }
  } else {
    // no permission
    show_nopermission();
    exit;
  }
}
and I just added this to make the delete work:

simage.php

Code:
// ############################  delete sig image #############################
if ($HTTP_GET_VARS['action']=="remove") {

  include("./global.php");

  if ($bbuserinfo['userid']==0){
    show_nopermission();
    exit;
  }

  if (is_numeric($HTTP_GET_VARS['imageid'])) {
    // delete file
    $sigimage = $DB_site->query_first("SELECT imageid, extension, userid, location FROM sigimage WHERE imageid = $HTTP_GET_VARS[imageid]");
    if ($sigimage['userid'] == $bbuserinfo['userid']) {
      // local location lets remove it.
      if ($sigimage['location']==0) {
        // can delete image
        @unlink($sigimagedir ."/uid". $bbuserinfo[userid] ."iid". $sigimage['imageid'] .".". $sigimage['extension']);
        // delete entry
      }
      $DB_site->query("DELETE FROM sigimage WHERE imageid=$HTTP_GET_VARS[imageid] AND userid=$bbuserinfo[userid]");

      $goto="simage.php?s=$session[sessionhash]&action=alterimg";
    eval("standardredirect(\"".gettemplate("redirect_imagedelete")."\",\"$goto\");");
    } else {
      // no permission
      show_nopermission();
      exit;
    }
  } else {
    // no permission
    show_nopermission();
    exit;
  }
}
The red entry is the missing text.

Mark
Reply With Quote
  #157  
Old 09-03-2002, 09:49 PM
Punchak Punchak is offline
 
Join Date: Dec 2001
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack !
I Just installed 2.0_4b as well (with vb 2.2.6), userCP work just fine, but I've red X in the sig area
Reply With Quote
  #158  
Old 09-04-2002, 02:09 AM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Punchak
Great hack !
I Just installed 2.0_4b as well (with vb 2.2.6), userCP work just fine, but I've red X in the sig area
Red X's mean you've set the PATH wrong. It must a absolute path to the location of sig images directory. E.g. /home/mysite/myimages
Reply With Quote
  #159  
Old 09-04-2002, 09:31 AM
Punchak Punchak is offline
 
Join Date: Dec 2001
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks dude it works like a charm now !
Reply With Quote
  #160  
Old 09-08-2002, 07:59 PM
ferior ferior is offline
 
Join Date: Nov 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm seeing a problem. When I upload an image, and click delete. The file seems to be still on the server [ different name , same file type ] So shouldn't it delete it off the server too?
Reply With Quote
  #161  
Old 09-08-2002, 08:54 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ferior
I'm seeing a problem. When I upload an image, and click delete. The file seems to be still on the server [ different name , same file type ] So shouldn't it delete it off the server too?

Define different name?

I have tested that this hack does remove images on all versions of php where the "unlink" function is present. However if your images path has a slash at the end then removal of images can fail.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04967 seconds
  • Memory Usage 2,315KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete