vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   New Posting Features - Photo Popup - Insert pictures easily from vB Albums, Photopost, vBGallery, Photoplog (https://vborg.vbsupport.ru/showthread.php?t=202385)

sinucello 03-12-2009 06:13 PM

Hi,

and another great hack by cellarius. I`ve been asking for such a feature in the Photopost forums but it never happened. So I`m very glad to see this. Will try to install it tomorrow.

thank you - all the best,
Sacha

subnet_rx 03-12-2009 07:46 PM

I am confused, does this work with Photoplog or not? I have the pro version.

Stoebi 03-13-2009 05:39 AM

No, is not working with Photoplog Pro, but is easy to patch.

Open photo_popup_config_photoplog.php and search for
PHP Code:

moderate 

Change to:
PHP Code:

moderate 

2 times


Regards, Stoebi

Stoebi 03-13-2009 05:45 AM

Quote:

Originally Posted by precisionextrem (Post 1730519)
This was working. Now I upgraded and it does not. This is what I am getting. It opens up, but when you click a picture nothing happens and it gives this error in IE.
Line: 372
Char:5
Error:Access is denied
Code:0
URL:http://www.precisionextreme.com/foru...=vB_Editor_001

Then you can click next and it gives this
Line:379
Char:16
Error:Syntax Error
Code:0
URL: Same as above

Next again
Line:356
Char:3
Error:Permission Denied
Code:0
URL: Same as above

What is going on??
Thanks,
Chris

You need to delete only the variable
HTML Code:

$vboptions[bburl]
from the 3 TMS patches to work again with IE.



To fix the Javascript Syntax error:
Open photo_popup.php and search for
PHP Code:

$copycode ""

and change this line to
PHP Code:

$copycode true



Regards, Stoebi

bjhuang 03-13-2009 07:54 AM

the main editor window get focused after insert with IE but not with FF.

Stoebi 03-13-2009 08:09 AM

Feature or not? ;)

My workaround; open template photo_popup and search for
HTML Code:

<body style="padding: 5px;">
Replace with
HTML Code:

<body style="padding: 5px;" onload="self.focus();">
If you click the text link 'Click to insert photo' or the bb-code the popup window is focused again.

bjhuang 03-13-2009 02:44 PM

to fix the bug that can not insert medium size image from photoplog:

open photo_popup_config_photoplog.php and find
PHP Code:

global $url_path

replace with
PHP Code:

global $url_path;
global 
$medium_switch


bjhuang 03-13-2009 03:23 PM

to fix the wrong gallery link for photoplog

open photo_popup_config_photoplog.php and find
PHP Code:

$img['gallery'] = $url_path "index.php?n=" $array['filename']; 

replace with
PHP Code:

$img['gallery'] = $url_path "index.php?n=" $array['fileid']; 


Stoebi 03-14-2009 01:25 PM

You are right, not tested before, thank you very much. :)

Is this for both, light and pro, or only pro?


Regards, Stoebi

bjhuang 03-14-2009 04:48 PM

only tested in photoplog pro.

and i'm wondering why there is no link_orig_2_gallery option.

bjhuang 03-15-2009 01:47 AM

1 Attachment(s)
Warning: this is a little bit complex, do not try this if you are not a experienced vb coder. Do it on your own risk!

to get photo popup work with images uploaded as attachments:

1. edit option "Products" (photo_popup_products), add "attachment" to validation code

2. add "attachment" to option "Products" (photo_popup_products)

3. add new phrase to "Global" group: photo_popup_attachment as "Attachments"

4. upload includes/photo_popup_config_attachment.php

5. modify photo_popup.php

Code:

[FIND]
$url_get_string =

[ADD BELOW]
$poststarttime =& $vbulletin->input->clean_gpc('r', 'poststarttime',TYPE_UINT);
$postid =& $vbulletin->input->clean_gpc('r', 'postid',TYPE_UINT);
if($poststarttime) $posthash = md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']);
if($vbulletin->GPC['e'] == "vB_Editor_QR") $postid=0;
$url_get_string .= "&amp;postid=$postid&amp;poststarttime=$poststarttime";

[FIND]
if ($insert_options_count > 1)

[REPLACE]
if ($insert_options_count > 1&&$which_product != 'attachment')

[FIND]
<input name=\"e\" type=\"hidden\" value=\"$editor\" />

[ADD BELOW]
<input name=\"postid\" type=\"hidden\" value=\"$postid\" />
<input name=\"poststarttime\" type=\"hidden\" value=\"$poststarttime\" />

[FIND]
// Add whitespace to codebits

[ADD ABOVE]
        if($which_product == 'attachment') {
                $text = $vbphrase[attachment];
                $codebb = "[ATTACH]".$img['id']."[/ATTACH]";
                $codehtml = $codebb;
        }

6. modify all the three TMS plugins:
Code:

[FIND]
photo_popup.php?e=$editorid

[REPLACE]
photo_popup.php?e=$editorid&amp;p=<if condition="$editorid!='vB_Editor_QR'">{$vbulletin->GPC[postid]}</if>&amp;poststarttime=<if condition="$timenow=TIMENOW">$timenow</if>

7. (optional) modify TMS plugin "Add Photo Popup Link":
Code:

[FIND]
            </td>
</td>
        </tr>
[REPLACE]
                                </tr><if condition="$can_attach"><tr><td>
                                [<a href="#" onclick="document.getElementById('manage_attachments_button').click();return false;">$vbphrase[manage_attachments]</a>]
                                </td>
        </tr></if>

8. now you will see the attachments belong to a post within photo popup window!

aztecboi2003 03-15-2009 06:07 PM

I thought I installed it right but I recieved this message when I tried to use it

The requested URL /board/photo_popup.php was not found on this server.

Plus the little camera icon isnt showing :( I'm only using the vbalbums and I didn't upload the folders in the other file

okay got it working now:D Still trying to get the little camera icon to appear.

Stoebi 03-17-2009 10:30 AM

Thanks bjhuang, but in Quick Reply no images are presented. And if I in another Thread which I did not have uploaded images (attachments), no images are shown.

Regards, Stoebi

Robi_Kenobi 03-17-2009 08:09 PM

Hi, this is a great Plugin. Wonderfull

But i have a strange problem with Firefox.

If i insert a picture into quick Replay Window (in wysiwyg mode) then there is "/.../" to much in the path to the picture so the img link pasted into the reply window is

"______/forum/../picture.php?albumid=7______"

and should be

"______/forum/picture.php?albumid=7______"

So you can only see a "red cross" then.

If i send the Answer the image in the final post is right. If i switch to normal mode not wysiwyg then the correct Link is inserted.

strange thing this only happens in

quick reply, wysiwyg and with the vbulletin album and Firefox

If i paste in extended reply everything works fine.
If i paste from Photopost pro everything ok, also in the quick reply.

very strange, any idea where the problem is?

Thanks a lot for your help.

---- Update ----

I found the link from Photopost ist also inserted wrong ....

"_____forum/../../gallery/data____"

but since the /gallery/ is a root folder, the ../.. doesn't chance anything an the picture shows up normal :(

Where do the "/../"s come from ?

bjhuang 03-17-2009 08:36 PM

Quote:

Originally Posted by Stoebi (Post 1770328)
Thanks bjhuang, but in Quick Reply no images are presented. And if I in another Thread which I did not have uploaded images (attachments), no images are shown.

Regards, Stoebi

yes, it meant to be. it only shows the thumbnail of attachments which you can see in the "manage attachment" popup. if you didn't upload attachments for the new post yet, there should be nothing to choose from. but if you are editing a existing post, you will see the attachments uploaded before.

but if you wish to choose from all the attachments you uploaded before for any post, it is easy. just modify the sql in the config file.

qbn720 03-17-2009 09:17 PM

Nice addition!

Tourmeister 03-18-2009 03:13 AM

Does this mod incorporate the VB permissions? Does it only open up albums/galleries that belong to the user or does it just open up ALL galleries and let the user browse them?

Blackhat 03-18-2009 06:05 PM

Quote:

Originally Posted by Tourmeister (Post 1770885)
Does this mod incorporate the VB permissions? Does it only open up albums/galleries that belong to the user or does it just open up ALL galleries and let the user browse them?

good question

wottech 03-19-2009 04:41 PM

It only opens albums/galleries belonging to the user.

EagleNick 03-21-2009 05:11 PM

Quote:

Originally Posted by EagleNick (Post 1746253)
I just installed the latest version (3.0.1) and it works fine... except for one thing:

I am using PhotoPlog and I entered that into the options (above "albums"). When I go to insert images, Photoplog is indeed a choice in the drop-down of "From:", but it's telling me:
The only filtering option I have is "show all my photos". I know for a fact that I have images in my gallery of PhotoPlog.

And no, I am not using PhotoPlog pro.

Everything else works and I can insert images from my vB User Albums just fine.

I'm not sure what the issue is.

I even reinstalled the product and re-uploaded the files and still haven't resolved this.

Cleenee 03-25-2009 08:08 AM

Hello
Been trying to get this to work with my VBgallery/Photopost type setup...as you can see have had 95% luck, changed the text to icons etc and the pop up comes up fine, the drop down for the various galleries selection even works, just does not seem to find the actual photos though, any ideas or advice...so close!

woffie 03-26-2009 12:47 AM

Added this to my test forum. Does not seem to work right. Click on the images and it does nothing. And yes, I did the edits

ZGeek 03-26-2009 06:34 AM

I can't get this to work with vbgallery either.

The problem I see in the photo_popup_config_vbgallery.php

$img['thumb'] = $data_dir . $new_userid . $filename_parts['filename'] . "_thumb." . $filename_parts['extension'] ;

Is not passing the file name. Anyone know how to fix this?

I should mention I have applied this modification.

EagleNick 03-26-2009 09:09 AM

Quote:

Originally Posted by woffie (Post 1777149)
Added this to my test forum. Does not seem to work right. Click on the images and it does nothing. And yes, I did the edits

What photo gallery modification are you trying to get it to work with? Is your issue similar to mine?

Mark.B 03-26-2009 06:35 PM

Really, really good! Worked for me straight away using the default vB albums, solves a major flaw in the album system and looks professional and intuitive to the end user. Ought to be a default feature.

EagleNick 03-26-2009 06:48 PM

For those of you who use this for PhotoPlog LITE, what do you have in the "Products" area? I have tried PhotoPlog, Photoplog, photoplog, and none of them work. :confused:

woffie 03-28-2009 01:40 AM

Quote:

Originally Posted by EagleNick (Post 1777337)
What photo gallery modification are you trying to get it to work with? Is your issue similar to mine?

Nope, just the vbgallery

abroad 03-28-2009 07:59 AM

I had 2.0 installed and it worked. I am using vb albums which comes with vbulletin. Now I upgraded to 3.1 and if I want to insert a picture then it does not stop loading when I click on a picture in the window which opened.... any idea what is wrong?

The URL of this window is:

http://www.mydomain.com/photo_popup.php

When I click on a picture to insert it, the URL changes to:

http://www.mydomain.com/photo_popup.php#

But the picture is not inserted afterwards....

jdougher 03-28-2009 03:43 PM

Quote:

Originally Posted by macc (Post 1766114)
hello

could not get image button on my editor and no link also to use this mod ...
some help?

use only albums and photoplog.

regards

macc

Same here. Did the install, followed directions, added code to templates.

No image in threads to access albums/pictures.

Have both photopost and albums, latest vB.

ZGeek 03-30-2009 05:21 AM

Quote:

Originally Posted by ZGeek (Post 1777302)
I can't get this to work with vbgallery either.

The problem I see in the photo_popup_config_vbgallery.php

$img['thumb'] = $data_dir . $new_userid . $filename_parts['filename'] . "_thumb." . $filename_parts['extension'] ;

Is not passing the file name. Anyone know how to fix this?

I should mention I have applied this modification.

If anyone is having troubles with vbgallery try this. It works for me.
PHP Code:

/*
###### Construct image bits ######
*/

function remove_filename_extension($stripper)
{
$extension strrchr($stripper".");

$stripper substr($stripper0, -strlen($extension));

return 
$stripper;
}

function 
imagebits ()
{
    global 
$array;
    global 
$data_dir;
    global 
$url_path;
        
    
$stripper $array['filename'];

    
$justthefile remove_filename_extension($stripper);
        
    
$new_userid '';
        for(
$i=0$i<strlen($array['userid']); $i++)
    {
    
$new_userid .= $array['userid'][$i] . "/";
    } 
    
$img['orig'] = $data_dir $new_userid $array['filename'];
    
$filename_parts pathinfo($array['filename']); 
    
$img['thumb'] = $data_dir $new_userid $justthefile "_thumb." $filename_parts['extension'] ;
    
$img['med'] = "";
    
$img['gallery'] = $url_path "showimage.php?i=" $array['imageid'];    

    return 
$img;


I'm very much a noob at php so if it doesn't work for you, I have no idea.

nikki712 03-30-2009 03:07 PM

I installed this and it works great. The only thing is that in the reply window, I have a text link to "insert photos", and not the camera icon. How do I change that?

nikki712 03-30-2009 04:03 PM

If you want to have an icon link to your photos instead of the "insert" text link, you can do the following:

The original coding for the editor_smilebox template is as follows:

Code:

<fieldset id="photobox" title="$vbphrase[photo_popup_my_photos]">
    <legend>$vbphrase[photo_popup_my_photos]</legend>
    <table cellpadding="4" cellspacing="0" border="0" align="center">
        <tr>
            <td class="smallfont" colspan="$vboptions[smcolumns]">
                      [<a href="#" onclick="window.open('$vboptions[bburl]/photo_popup.php?e=$editorid','fotos','scrollbars=yes,resizable=yes,width={$vbulletin->options['photo_popup_width']},height={$vbulletin->options['photo_popup_heigth']}'); return false" title="$vbphrase[photo_popup_insertlink]">$vbphrase[photo_popup_insert]</a>]</td>
            </td>
</td>
        </tr>
    </table>
</fieldset>

Instead, try this:

Code:

<fieldset id="photobox" title="$vbphrase[photo_popup_my_photos]">
    <legend>$vbphrase[photo_popup_my_photos]</legend>
    <table cellpadding="4" cellspacing="0" border="0" align="center">
        <tr>
            <td class="smallfont" colspan="$vboptions[smcolumns]">
                      <a href="#" onclick="window.open('$vboptions[bburl]/photo_popup.php?e=$editorid','fotos','scrollbars=yes,resizable=yes,width={$vbulletin->options['photo_popup_width']},height={$vbulletin->options['photo_popup_heigth']}'); return false" title="$vbphrase[photo_popup_insertlink]"><img src="$stylevar[imgdir_editor]/CameraIcon.png" border="0" /></a></td>
            </td>
</td>
        </tr>
    </table>
</fieldset>

Just change the title of the image and the image directory, and you should be all set.

ZiG 03-30-2009 11:56 PM

Quote:

Originally Posted by Cleenee (Post 1776513)
Hello
Been trying to get this to work with my VBgallery/Photopost type setup...as you can see have had 95% luck, changed the text to icons etc and the pop up comes up fine, the drop down for the various galleries selection even works, just does not seem to find the actual photos though, any ideas or advice...so close!

this used to work for me, now its not for some reason...
it is finding album pictures perfectly fine, but it is not finding any of the pictures in the photoplog categories. it finds the categories perfectly fine though, but says the user has no pictures that belong to it...when that is false. whats the problem?

please help

Cleenee 03-31-2009 12:45 AM

Quote:

Originally Posted by ZGeek (Post 1780169)
If anyone is having troubles with vbgallery try this. It works for me.
PHP Code:

/*
###### Construct image bits ######
*/

function remove_filename_extension($stripper)
{



I'm very much a noob at php so if it doesn't work for you, I have no idea.

Pfft way to be a legend zGeek, works like a charm now!, much karma your way!

ZGeek 03-31-2009 01:18 AM

W00t! Glad to help :)

abroad 03-31-2009 02:42 PM

vb Albums: Did anybody figure out how to fix it? Can't insert pictures from the popup window.

Cleenee 04-01-2009 03:02 AM

Quick question this works perfectly for every account accept my admin, is there some permissions setting that I might be missing?

Stanthrax 04-08-2009 07:56 PM

I just wanted to say that this add-on is great! I've been looking for something like this for a long time. Now my members can add pics to there posts quickly and easily. Thanks!

yahoooh 04-08-2009 09:24 PM

is there ability to add imagehost addon ?

0ptima 04-09-2009 06:54 PM

Has the hack been updated to incorporate all the fixes found in the thread?


All times are GMT. The time now is 06:34 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.01817 seconds
  • Memory Usage 1,873KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_html_printable
  • (10)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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