vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - Vbimghost ver 2.0.0 (https://vborg.vbsupport.ru/showthread.php?t=237158)

indy1979 06-14-2012 10:22 PM

Ok, I'm getting sick of waiting for a "Conversion Tool". Here is what I've come up with so far...

First, I went in the DB and exported the vb_vbimghost table as a CSV. I then edited the CSV to have the following columns (userid, imageName, imageURL)

With the new CSV in hand, I wrote the following script to download all of the users' images in to a separate directory matching their userid.

Code:

#!/bin/bash
INPUT=./inputfile2.csv
OLDIFS=$IFS
IFS=,
testCol=222
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read col1 col2 col3
do
        curl --create-dirs $col3 -o ./$col1/$col2
done < $INPUT
IFS=$OLDIFS

Now I have a directory structure of $userid/$imagename

This is as far as I've gotten. If someone knows how to force an upload in to the Albums portion of VB4 as a specific userid, please feel free to update.

*EDIT*

At this point, I'm not at all worried about breaking existing links on other websites. I'd rather take the heat for that than not being able to upgrade my board because of a heavily used mod.

Alex@Mk3OC 07-25-2012 09:43 AM

Anyone got this working on 4.2? Only think I can't sort is the navbar

Mauro79 09-05-2012 01:41 AM

could make it functional for 4.2?
fails, and no panel to gain many pictures.
Please

alzaabi 10-04-2012 07:48 PM

how to make this work on vb 4.20

XGC Paravain 11-26-2012 01:37 AM

Where can I go to view the path to my forums so I can just copy and paste the path in the settings? Yes I got the 404 error

XGC Paravain 11-26-2012 09:30 PM

I found my path and still getting the message 404 not found is this thread active?

indy1979 12-27-2012 01:45 AM

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.

M.C. 03-31-2013 07:14 AM

Quote:

Note: I don't not recommend using it as a new hack, since Albums in the vbulletin does the same thing even better. this is mainly to people who used vbimghost on previous version and want to use it on vb 4.0.x
Hmmm.. so may be there is album uploader can be done to be able to upload images via quick reply/reply/new thread form and insert them into message?

RichieBoy67 02-10-2014 01:41 AM

Quote:

Originally Posted by indy1979 (Post 2339628)
Ok, I'm getting sick of waiting for a "Conversion Tool". Here is what I've come up with so far...

First, I went in the DB and exported the vb_vbimghost table as a CSV. I then edited the CSV to have the following columns (userid, imageName, imageURL)

With the new CSV in hand, I wrote the following script to download all of the users' images in to a separate directory matching their userid.

Code:

#!/bin/bash
INPUT=./inputfile2.csv
OLDIFS=$IFS
IFS=,
testCol=222
[ ! -f $INPUT ] && { echo "$INPUT file not found"; exit 99; }
while read col1 col2 col3
do
    curl --create-dirs $col3 -o ./$col1/$col2
done < $INPUT
IFS=$OLDIFS

Now I have a directory structure of $userid/$imagename

This is as far as I've gotten. If someone knows how to force an upload in to the Albums portion of VB4 as a specific userid, please feel free to update.

*EDIT*

At this point, I'm not at all worried about breaking existing links on other websites. I'd rather take the heat for that than not being able to upgrade my board because of a heavily used mod.

What did you end up doing? I am looking into a similar issue. I have a client who has the database table and files only and would like to move those into the albums system.

twistsol 03-06-2016 01:47 AM

Is there still any interest in a converter?

I'm in the middle of writing one for my board because it is necessary. It's probably still a couple of weeks away depending on how much time I get to work on it, and it will be ugly. I'm at a point that I need to decide if I write for one time use for my site only or if it is going to be released into the wild.


All times are GMT. The time now is 05:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01160 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete