The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
PhotoPost Random Image Option Details »» | |||||||||||||||||||||||||
I have made an add-on that will display random images from PhotoPost on the forums home page, seen here: http://www.modernengineuity.com/forums/index.php
What I want to do is make this an option in the user CP. I have already added the option to the user control panel and made a separate forumhome template. What I need help with is modifying index.php to display this template depending on whether or not the user has chosen this option. Thanks. Show Your Support
|
Comments |
#12
|
||||
|
||||
OK. Will do so shortly.
|
#13
|
|||
|
|||
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 |
#14
|
||||
|
||||
Thanks!
|
#15
|
|||
|
|||
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 |
#16
|
||||
|
||||
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. |
#17
|
|||
|
|||
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 |
#18
|
||||
|
||||
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 I'm finalizing the full instructions for the rest of it as well and will posting them soon. |
#19
|
||||
|
||||
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(); ?> 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']; } ?> http://www.allartistaccess.com/profi....php?userid=43 How would I get this to be over in the template getinfo? |
#20
|
||||
|
||||
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. |
#21
|
|||
|
|||
lo SVTBlackLight01,cheers for pm all works ok now :0
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|