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)

WildSoftCat 05-14-2009 11:21 AM

Hi, Cellarius !

Maybe it will be useful for somebody with photopost :

includes/class_bbcode.php in function handle_bbcode_img_match($link) find

PHP Code:

return '<img src="' .  $link '" border="0" alt="" />'

and replace with

PHP Code:

$cat "";
$big "";
$search "photopost/data";
$i strpos $link$search );

if  ( 
$i != )
{
$cat substr $link$i strlen $search ) + );
$cat str_replace "medium/" ""$cat );
$i strpos ($cat"/" );
$big substr $cat$i );
$cat substr $cat0$i );

$query "SELECT * FROM `pp_photos` WHERE (cat = " $cat " AND bigimage = '" $big "') OR (storecat = " $cat " AND bigimage = '" $big "') ";

$results $this->registry->db->query_read("$query);

if (
$this->registry->db->num_rows($results) > 0)
   {
   while (
$result $this->registry->db->fetch_array($results))
    {
      
$corr $result['id'];
      
$tit $result['title'];
      }
   }
$gal 'http://www.art-in-exile.com/forums/photopost/showgallery.php?cat=' $cat;
$pic 'http://www.art-in-exile.com/forums/photopost/showphoto.php?photo=' $corr;

$linkg '<td align="left"><div class="smallfont"><a href="' $pic '" target="_blank">' $tit '</a></div></td><td align="right"><div class="smallfont"><a href="' $gal '" target="_blank">Gallery</a></div></td>'

        return 
'<table><tr><td colspan=2><img src="' .  $link '" border="0" alt="" /></td></tr><tr>' $linkg '</tr></table>';
}
else
{
        return 
'<img src="' .  $link '" border="0" alt="" />';


This adds links to gallery and photo below image ( [IМG] tag ), only if image is in photopost datastore. Links addition on-fly, during show (showthread e.g.), not during posting or editing.

Sorry, i've no time to do it well, so this code needs some replacement for user's config :

1. path to photopost (2 lines)
2. determine photopost in link to image : $search = "photopost/data";
3. photopost tables prefix : pp_

DEMO here

Maybe somebody can do it better :)

This code needs yet one replacement in another file, who is interested in it - PM, please

cellarius 05-14-2009 11:40 AM

I will not support this code or function in this form. Just one hint after a quick scan: To use * in a query where only very few fields are needed is not exactly good.

It would be far easier to pull that information in the mod directly than to hack vB files. The mod already offers one insert option that displays a link under the inserted image. To pull the image title would not even call for an additional query.

WildSoftCat 05-15-2009 04:21 AM

Thanks for reply. Idea was to provide cross-link between pictures in photopost and VB posts without any action from userside. My users can click link below picture in post and go to gallery, review pictures there and return to threads & posts just with selected picture inside. It's hard to server, but my forum isn't large.

RWerksman 05-17-2009 03:44 AM

The album filter doesn't work on PhotoPlog currently. I've been mucking around with it for the last two hours or so, and I just cant get it to work correctly. It just doesn't seem to populate the dropdown so that the filter can apply.

The select in the catagories.php seems correct:

Code:

/*
###### Select statement for useralbums or categories ######
*/
function albums_select ()
{
    global $db_prefix;
    global $userid;
   
    $albums_select = "
        SELECT catid, title
        FROM " . $db_prefix . "categories
        ORDER BY title
        ";
    return $albums_select;
}

I can't seem to figure out what photo_popup.php does with it from there:

Code:

/*
###### What album dropdown  ######
*/
if ($allow_albums AND $albums_possible)
{
    if (!$other_db)
    {
        $result = $db->query_read(albums_select());
    }
    else
    {
        $result = mysql_query(albums_select());
    }
    $album_options = "<div style=\"whitespace: nowrap; display: inline;\"><strong>" . $vbphrase[photo_popup_album_select] . ":</strong>
<select name=\"alb\" onchange=\"this.form.submit();\">";
    $album_options .= "<optgroup label=\"" . $vbphrase[photo_popup_which_albums] . "\">";
    $album_options .= "<option value=\"all\">" . $vbphrase[photo_popup_all_albums] . "</option>";
    echo $album_options;
    echo "a";
    while (list($catid, $catname) = @ mysql_fetch_row($result))
    {
        if ($which_album == $catid)
        {
            $selected = " selected=\"selected\"";
        }
        $album_options .= "<option value=\"" . $catid . "\"" . $selected . ">" . $catname . "</option>";
        $selected = FALSE;
    }
    $album_options .= "</optgroup></select></div>";
}

I *think* it's getting messed up here:

Code:

while (list($catid, $catname) = @ mysql_fetch_row($result))
because it's selecting catid and title. When I echo out $catid and $catname it doesnt return anything.

I'm stumped. :(

puppetmaster222 06-04-2009 03:09 AM

Great mod is working with the Garage module flawlessly!!

Thanks.

cory_booth 06-10-2009 12:51 AM

For the record... It has been posted here a few times...
The drop-down for album categories does not populate.
If I open photo-popup, everything works fine, but the only option I have is ALL IMAGES.
Thus I have to flip through 1000s of photos to find the ones I want.
I cannot drill down through my albums.

Yes...

I have seen and tried the filter override settings.

cellarius 06-10-2009 07:11 AM

Quote:

Originally Posted by cory_booth (Post 1826753)
For the record... It has been posted here a few times...

The drop-down for album categories does not populate.

What product do you use? If you mean the vB album: I'm not aware that this has been reported for albums, and it works just fine for me (and a lot of others ;))

Andyrew 06-10-2009 07:09 PM

This has stopped working for me, when a user posts a thumbnail that links to the bigger pic it goes to my album listing when clicked on. :confused:
I am using TMS but something is not working correct.

metalguy639 06-10-2009 09:17 PM

Tried to install this on a 3.8.2 board. I get this error:

Code:

Photo Popup Error #2: missing config file

The configuration file "photo_popup_config_photopost" for this product is missing in [forumroot]/includes directory. Please consult installation instructions for this mod.

The file I was looking for is:
/home/content/t/o/m/tommydamic68/html/includes/photo_popup_config_photopost.php

Erm I have those files uploaded to the includes directory I checked. We have the user albums & Photoplog Lite 2.0.7 installed on the site. It works for the user albums but not for Photoplog.

Any way to fix this?

cellarius 06-12-2009 10:31 PM

You have set it to use photopost in the options for this mod, not photoplog. Change that - it is looking for the photopost config file, just as the error states.


All times are GMT. The time now is 09:29 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.02141 seconds
  • Memory Usage 1,773KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)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