Thread: Major Additions - Vbimghost ver 2.0.0
View Single Post
  #88  
Old 12-27-2012, 01:45 AM
indy1979 indy1979 is offline
 
Join Date: Jan 2010
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, since its pretty evident that no one is working on this mod anymore and it breaks with the install of 4.2, I am providing how I am transitioning my users away from this mod so that I can upgrade my board.

Follow the instructions I posted above to get a directory structure of all of your users images inside the image hosting mod.

Next, I ran the following script and input the parent directory holding all of the userid directories as an input to script.

Code:
#!/bin/bash

  IFS=$'\n'

  for f in $(find "$1" -mindepth 1 -maxdepth 1 -type d ); do
    zip -r "$f" "$f"
  done
Here is my command to run the script:
Code:
./zipSEDSM.sh SEDSMConversion
After the script runs, you will have a zip file of each of the userid directories. Now move all of these zip files into a directory on your server that is preferably inside your forum directory. In my case I put all of the zip files in to a folder called IHBackup so that my url to access it would be http://www.domain.com/IHBackup/xxx.zip.

Now that we have the backup done, it's time to give the users access to their zip files.

Go to AdminCP -> Styles & Templates -> Style Manager

Select Edit Template for each style you are offering your users.

Expand Member Info Templates and double click MEMBERINFO

Search for:
Code:
<vb:if condition="$show['contactlinks'] AND $show['pmlink']">
and add above it:

Code:
<li>
<a href="IHBackup/{vb:raw prepared.userid}.zip"><img src="{vb:stylevar imgdir_siteicons}/homepage.png" class="inlineimg" />Download Image Hosting Archive</a>
</li>
While we are in the template editor, scroll down to vbimghost_navbits and edit it.

Change:

Code:
<li><a href="vbimghost.php?do=upload">{vb:phrase vbimghost_menuupimg}</a></li>
to

Code:
<!--<li><a href="vbimghost.php?do=upload">{vb:phrase vbimghost_menuupimg}</a></li>-->
This will prevent users from uploading new images in to the mod and force them to use the Gallery/Album feature.

Now go to AdminCP -> Plugins & Products -> Plugin Manager

Scroll down to the VB Image Hosting section and uncheck all of the checkboxes except for vbimghost_navbits and click Save Active Status.

VB Image Host should now be somewhat disabled/restricted so that users will only be able to look at the contents of it. They will also now have a link to download the archive of their hosting information.

I basically told my users that they can download their images and reupload them into their albums if they want to reuse them. Albums also provides the external link for them.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01225 seconds
  • Memory Usage 1,778KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete