vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   PhotoPost Random Image Option (https://vborg.vbsupport.ru/showthread.php?t=56289)

SVTBlackLight01 09-01-2003 10:18 AM

OK. Will do so shortly. :)

lasto 09-01-2003 12:29 PM

works brilliant m8
i just logged in at your forum and i seen the pics so wetn to usercp turned em off and bingo they gone.

Well done m8

SVTBlackLight01 09-01-2003 01:13 PM

Thanks! :D

lasto 09-01-2003 03:40 PM

1 Attachment(s)
Lo m8,feedback as promised and thanks for letting me be a tester on this hack.Install time for me was about 15 mins max on vb2.3.

Installation went smooth - had no errors what so ever and it works :)

wot can i say it works - the box appears and there is 4 images in it (only downside is it says no image available but this could be to the fact photopost is not inside the vbull dir,but i have called it in and it shows the name and views etc so just need to solve this one.)

Anyway went to usercp and switched it off and bingo it was gone.
Hacks works sweet m8 - is one small thing though is there a query where i can set it so they are all off by default as i prefer it this way.

Top hack so congrats on your next release :)

Edit - pic attached as u can see the names are there just not pic an di cant run photopost in the same dir as vbull as some files have same name etc.

Adds 1 querie to main page

SVTBlackLight01 09-01-2003 09:46 PM

Glad you like it.

You can set it to be off by default by running this query:

ALTER TABLE `user` CHANGE `showphoto` `showphoto` SMALLINT( 6 ) DEFAULT '0' NOT NULL

As far as the problem with getting the "thumbnail not available", I'll take a look at it.

Mickie D 09-01-2003 10:31 PM

how do you call your photos from your gallery to your board ???

are u using the thumbincluder.php or you use another method ???

i am currently writing addon hacks for pixelfx's photopost intergration (i just wrote a addon for forum home aswell :))

i have got quite tied into this lol... and i am looking for a better way to call it than implode

SVTBlackLight01 09-01-2003 10:48 PM

Yes. This is using the thumbnail includer.

Actually the code to call the thumbs is taken form the PhotoPost site.

Here is what I used in index.php:

Code:

// Thumbnail includer hack
ob_start();
require("yourfile.php");
$thumbnails = ob_get_contents();
ob_end_clean();
// Thumbnail includer hack end

Then you can basically call the $thumbnails anywhere you want the thumbs to be displayed.

I'm finalizing the full instructions for the rest of it as well and will posting them soon.

themonarch 09-01-2003 11:01 PM

I've been working on calling a specific user's photos and placing them in their profile. I'm getting close but it's not working yet. This is my first attempt at such a large modification. Here's what I'm doing so far.

Here's my php page code to get the user's photopost image, which when I load it in a browser window works:
Code:

<?php
//Connection statement
require_once('Connections/picConn.php');

// begin Recordset
$query_Recordset1 = "SELECT * FROM photos WHERE photos.userid = ('$userid')";
$Recordset1 = $picConn->SelectLimit($query_Recordset1) or die($picConn->ErrorMsg());
$totalRows_Recordset1 = $Recordset1->RecordCount();
// end Recordset
?>
<img src="mediapost/data/500/<?php echo $Recordset1->Fields('bigimage'); ?>" width="120" height="120">
<?php
$Recordset1->Close();
?>

Here's my connection script:
Code:

<?php
        # Type="ADODB"
        # HTTP="true"
        # DBTYPE="mysql"
       
        $MM_picConn_HOSTNAME = "localhost";
        $MM_picConn_DATABASE = "mysql:photopost";
        $MM_picConn_DBTYPE  = preg_replace("/:.*$/", "", $MM_picConn_DATABASE);
        $MM_picConn_DATABASE = preg_replace("/^.*?:/", "", $MM_picConn_DATABASE);
        $MM_picConn_USERNAME = "username";
        $MM_picConn_PASSWORD = "password";
        $MM_picConn_LOCALE = "Us";
        $MM_picConn_MSGLOCALE = "En";
        $MM_picConn_CTYPE = "P";
        $KT_locale = $MM_picConn_MSGLOCALE;
        $KT_dlocale = $MM_picConn_LOCALE;
        $KT_serverFormat = "%Y-%m-%d %H:%M:%S";
        $QUB_Caching = "false";
       
        switch (strtoupper ($MM_picConn_LOCALE)) {
                case 'EN':
                                $KT_localFormat = "%d-%m-%Y %H:%M:%S";
                break;
                case 'EUS':
                                $KT_localFormat = "%m-%d-%Y %H:%M:%S";
                break;
                case 'FR':
                                $KT_localFormat = "%d-%m-%Y %H:%M:%S";
                break;
                case 'RO':
                                $KT_localFormat = "%d-%m-%Y %H:%M:%S";
                break;
                case 'IT':
                                $KT_localFormat = "%d-%m-%Y %H:%M:%S";
                break;
                case 'GE':
                                $KT_localFormat = "%d-%m-%Y %H:%M:%S";
                break;
                case 'US':
                                $KT_localFormat = "%Y-%m-%d %H:%M:%S";
                break;
                default :
                                $KT_localFormat = "none";                       
        }


       
        if (!defined('CONN_DIR')) define('CONN_DIR',dirname(__FILE__));
        require_once(CONN_DIR."/../adodb/adodb.inc.php");
        ADOLoadCode($MM_picConn_DBTYPE);
        $picConn=&ADONewConnection($MM_picConn_DBTYPE);

        if($MM_picConn_DBTYPE == "access" || $MM_picConn_DBTYPE == "odbc"){
                if($MM_picConn_CTYPE == "P"){
                        $picConn->PConnect($MM_picConn_DATABASE, $MM_picConn_USERNAME,$MM_picConn_PASSWORD,
                        $MM_picConn_LOCALE);
                } else $picConn->Connect($MM_picConn_DATABASE, $MM_picConn_USERNAME,$MM_picConn_PASSWORD,
                        $MM_picConn_LOCALE);
        } else if (($MM_picConn_DBTYPE == "ibase") or ($MM_picConn_DBTYPE == "firebird")) {
                if($MM_picConn_CTYPE == "P"){
                        $picConn->PConnect($MM_picConn_HOSTNAME.":".$MM_picConn_DATABASE,$MM_picConn_USERNAME,$MM_picConn_PASSWORD);
                } else $picConn->Connect($MM_picConn_HOSTNAME.":".$MM_picConn_DATABASE,$MM_picConn_USERNAME,$MM_picConn_PASSWORD);
        }else {
                if($MM_picConn_CTYPE == "P"){
                        $picConn->PConnect($MM_picConn_HOSTNAME,$MM_picConn_USERNAME,$MM_picConn_PASSWORD,
                          $MM_picConn_DATABASE,$MM_picConn_LOCALE);
                } else $picConn->Connect($MM_picConn_HOSTNAME,$MM_picConn_USERNAME,$MM_picConn_PASSWORD,
                          $MM_picConn_DATABASE,$MM_picConn_LOCALE);
  }

        if (!function_exists("updateMagicQuotes")) {
                function updateMagicQuotes($HTTP_VARS){
                        if (is_array($HTTP_VARS)) {
                                foreach ($HTTP_VARS as $name=>$value) {
                                        if (!is_array($value)) {
                                                $HTTP_VARS[$name] = addslashes($value);
                                        } else {
                                                foreach ($value as $name1=>$value1) {
                                                        if (!is_array($value1)) {
                                                                $HTTP_VARS[$name1][$value1] = addslashes($value1);
                                                        }
                                                }
                                               
                                        }
                                        global $$name;
                                        $$name = &$HTTP_VARS[$name];
                                }
                        }
                        return $HTTP_VARS;
                }
               
                if (!get_magic_quotes_gpc()) {
                        $HTTP_GET_VARS = updateMagicQuotes($HTTP_GET_VARS);
                        $HTTP_POST_VARS = updateMagicQuotes($HTTP_POST_VARS);
                        $HTTP_COOKIE_VARS = updateMagicQuotes($HTTP_COOKIE_VARS);
                }
        }
        if (!isset($HTTP_SERVER_VARS['REQUEST_URI'])) {
                $HTTP_SERVER_VARS['REQUEST_URI'] = $HTTP_SERVER_VARS['PHP_SELF'];
        }
?>

And when I load the page in the browser using this format to switch users, it works...just switch the number of the user on the end.
http://www.allartistaccess.com/profi....php?userid=43

How would I get this to be over in the template getinfo?

SVTBlackLight01 09-01-2003 11:19 PM

You could try the same method as above to set the variable and then call the variable in the profile template.

You would have to add the code to member.php.

lasto 09-02-2003 01:16 AM

lo SVTBlackLight01,cheers for pm all works ok now :0


All times are GMT. The time now is 04:19 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.01011 seconds
  • Memory Usage 1,761KB
  • 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
  • (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