vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Photopost Latest uploads in user profile (https://vborg.vbsupport.ru/showthread.php?t=111893)

MamboCube 04-10-2006 05:44 PM

yeh its "pp_", i checked it in config_int

The Realist 04-10-2006 05:48 PM

The path should be like this: /home/blah/public_html/photopost

Laters

MamboCube 04-10-2006 06:00 PM

Quote:

Originally Posted by The Realist
The path should be like this: /home/blah/public_html/photopost

when i do this i get this error message

Code:

Warning: Unknown(home/*****/public_html/gallery/config-int.php): failed to open stream: No such file or directory in /member.php(651) : eval()'d code on line 4

Warning: Unknown(home/*****/public_html/gallery/config-int.php): failed to open stream: No such file or directory in /member.php(651) : eval()'d code on line 4

Fatal error: (null)(): Failed opening required 'home/*****/public_html/gallery/config-int.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*****/public_html/forum/member.php(651) : eval()'d code on line 4

any ideas?

MamboCube 04-10-2006 06:17 PM

ok, i put a forward slash infront of "home" and now i get this error again

Code:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 36

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 88

any one else got any ideas wat this could be

MamboCube 04-11-2006 06:31 AM

ok, not sure if this would work but i have added this code


Code:

//################ Go to gallery directory.
chdir("gallery");

//############### Require config.
require "./config-int.php";

//################ Back to forum directory.
chdir("forum");

and i get this error

Code:

Parse error: syntax error, unexpected '<' in /home/*****/public_html/forum/member.php(651) : eval()'d code on line 3
does this mean that this way wont work?

vbreal 04-11-2006 10:41 AM

i get this error

Fatal error: Cannot redeclare pp_get_ext() (previously declared in /hsphere/local/home/trudaily/trudaily.com/gallery/ppp_block.php:64) in /hsphere/local/home/trudaily/trudaily.com/member.php(652) : eval()'d code on line 459

the photopostblock hack which displays pics at the top of my forum home page. it shows random images. it works fine when i disable it.

they both use the same variable. how can i get both to work at the same time

Delphiprogrammi 04-11-2006 02:25 PM

Quote:

Originally Posted by Real Talk
i get this error

Fatal error: Cannot redeclare pp_get_ext() (previously declared in /hsphere/local/home/trudaily/trudaily.com/gallery/ppp_block.php:64) in /hsphere/local/home/trudaily/trudaily.com/member.php(652) : eval()'d code on line 459

the photopostblock hack which displays pics at the top of my forum home page. it shows random images. it works fine when i disable it.

they both use the same variable. how can i get both to work at the same time

ok try this open the plugin "PhotoPost Gallery Photos in profile" and find this code

PHP Code:

function pp_get_ext($filename)
{
    return 
substr($filenamestrrpos($filename,"."));


comment it out like this

PHP Code:

/*function pp_get_ext($filename)
{
    return substr($filename, strrpos($filename,"."));
}*/ 

now try again

Delphiprogrammi 04-11-2006 02:28 PM

Quote:

Originally Posted by MamboCube
ok, not sure if this would work but i have added this code


Code:

//################ Go to gallery directory.
chdir("gallery");

//############### Require config.
require "./config-int.php";

//################ Back to forum directory.
chdir("forum");

and i get this error

Code:

Parse error: syntax error, unexpected '<' in /home/*****/public_html/forum/member.php(651) : eval()'d code on line 3
does this mean that this way wont work?

that error would mean you have syntax related error at the line php told you (or before that line)

Delphiprogrammi 04-11-2006 02:30 PM

Quote:

Originally Posted by MamboCube
ok, i put a forward slash infront of "home" and now i get this error again

Code:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 36

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 88

any one else got any ideas wat this could be

if you are not sure what the path is you should ask your host or if you have shell access you can find out

MamboCube 04-11-2006 04:08 PM

i know that the path is /home/*****/public_html/gallery

that should be working

this is the code i have when i put in the chdir

Code:

$ppath="/gallery";

//################ Go to forum directory.
chdir("../gallery");

require "./config-int.php";

//################ Back to website directory.
chdir("../forum");
//###################################################################################
//if you use Photopost in a SEPERATED database from vbulletin uncomment these lines
//###################################################################################
//$link=mysql_connect("localhost","$dbuserid","$dbuserpassword") OR die("I cannot connected to the Database");
//mysql_select_db("products") OR die("failed to select PhotoPost Database");
//####################################################################################

//##############################
// Number of photos to display
$num_display = 4;
//##############################

//#####################################
// Number of columns (1 for vertical)
$columns = 4;
//#####################################

//#####################################################################
// which type of images do you want to show (random, most_view, latest)
$q_switch = "latest";
//######################################################################
if(!isset($ViewPerm))
{
        if(isset($vbulletin->userinfo['usergroupid']))
        {
                $mygroups = $vbulletin->userinfo['usergroupid'];
                if ($vbulletin->userinfo['membergroupids'] != "") $mygroups .= ",".$vbulletin->userinfo['membergroupids'];
        }
        $grouparr = explode( ",", $mygroups );
        $resultb = mysql_query("SELECT id,ugnoview FROM {$pp_db_prefix}categories");
        $ViewPerm = array();
        while (list($catugid,$ugnoview)=mysql_fetch_row($resultb))
        {
                $noview=0; $ViewPerm[$catugid] = 1;
                $allnoview = explode( ",", $ugnoview );
                foreach ($allnoview as $key)
                {
                        if (in_array($key,$grouparr))
                        {
                                  $noview=1;
                        }
                }
                if ($noview == 0)
                {
                        $ViewPerm[$catugid]=0;
                }
        }
}
function pp_get_ext($filename)
{
        return substr($filename, strrpos($filename,"."));
}
function pp_is_image( $filename)
{
        $retval = 0;
        $mediatypes = array( ".jpg", ".gif", ".png", ".bmp");
        $ext = pp_get_ext($filename);
        if (in_array(strtolower($ext),$mediatypes)) $retval=1;
        return $retval;
}
switch ($q_switch)
{
        case "latest":
        $query = "SELECT id,user,userid,cat,bigimage,height,width
                        FROM {$pp_db_prefix}photos
                        WHERE storecat = 0 AND userid = $userinfo[userid]
                        ORDER BY date DESC";
                break;
        case "most_view":
        $query = "SELECT id,user,userid,cat,bigimage,height,width
                        FROM {$pp_db_prefix}photos
                        WHERE storecat = 0 AND userid = $userinfo[userid]
                        ORDER BY views DESC";
                break;
        case "random":
        $query = "SELECT id,user,userid,cat,bigimage,height,width
                        FROM {$pp_db_prefix}photos
                        WHERE storecat = 0 AND userid = $userinfo[userid]
                        ORDER BY RAND()";
                break;
}
$result=mysql_query($query);
$counted = 0; $countcol = 0; $profileimagebits = "";
while (list($pid,$puser,$puserid,$pcat,$photo,$height,$width) = mysql_fetch_row($result))
{
        if ( $ViewPerm[$pcat] == 1 ) continue;
        if (pp_is_image($photo))
        {
                $temp_user = $puserid;
                if ($height > $width)
                          $mthumb = "<img src=\"{$url_path}/images/overlay-roundp.gif\" height=\"105\" width=\"81\" border=\"0\" alt=\"\" />";
                else
                        $mthumb = "<img src=\"{$url_path}/images/overlay-round.gif\" height=\"81\" width=\"105\" border=\"0\" alt=\"\" />";
                $profileimagebits .= <<<PPPRINT
    <td align="center" class="alt1">
        <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td style="background: url({$data_dir}{$pcat}/thumbs/$photo); background-color: #000000; background-repeat: no-repeat; background-position: center;"><a href="{$url_path}/showphoto.php?photo={$pid}">$mthumb</a></td>
        </tr>
        </table>
    </td>
PPPRINT;
        $counted++;
        $countcol++;
        }
        if ($counted == $num_display ) break;
        if ($countcol == $columns)
        {
                $profileimagebits .= <<<PPPRINT
    </tr>
    <tr>
PPPRINT;
    $countcol = 0;
        }
}
@mysql_free_result($result);

//###################################################################################################################
//if you use PhotoPost in a SEPERATED database you need to uncomment this line to reselect it
//###################################################################################################################
//mysql_select_db("products") or die("Unable to select PhotoPost Database");

i am now getting this error

Code:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 43

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /member.php(651) : eval()'d code on line 95

know what this means?

thnx for the help by the way

appreciate it


All times are GMT. The time now is 12:44 PM.

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.01554 seconds
  • Memory Usage 1,778KB
  • 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
  • (9)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)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
  • (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