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)

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 .= "&postid=$postid&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.


All times are GMT. The time now is 04:59 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.01451 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
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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