View Single Post
  #3  
Old 06-29-2018, 10:50 PM
DCD.RB DCD.RB is offline
 
Join Date: Jan 2011
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think that's what I'm looking for. That seems to upload images for posts.

I'm looking for something like Profile Pictures, but allowing more than 1.

--------------- Added [DATE]1530326939[/DATE] at [TIME]1530326939[/TIME] ---------------

Quote:
Originally Posted by DCD.RB View Post
I got this one to work by adding this line to the input code:
Code:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
But the images show on the profile, I believe using this hook:
Code:
	<plugin active="1">
			<title>Profile Gallery</title>
			<hookname>member_complete</hookname>
			<phpcode><![CDATA[$vbulletin->input->clean_array_gpc('g', array(
	'page' => TYPE_UINT,
	'pp' => TYPE_UINT
));

$profilegallery_filecount = $db->query_first("
	SELECT COUNT(*) AS cnt
	FROM " . TABLE_PREFIX . "pg_profile_gallery
	WHERE userid = " . intval($userinfo['userid']) . "
");

$profilegallery_total_rows = intval($profilegallery_filecount['cnt']);

$db->free_result($profilegallery_filecount);

$profilegallery_cntbits = 0;
$profilegallery_picbits = '';
$profilegallery_piclist = '';

if ($profilegallery_total_rows > 0)
{
	$profilegallery_page_num = $vbulletin->GPC['page'];
	$profilegallery_per_page = $vbulletin->GPC['pp'];
	$profilegallery_tdwidth = intval(100 / 5);

	sanitize_pageresults($profilegallery_total_rows, $profilegallery_page_num, $profilegallery_per_page, 10, 10);
	$profilegallery_lower_limit = max(0, ($profilegallery_page_num - 1) * $profilegallery_per_page);
	$profilegallery_sort_url = 'member.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $userinfo['userid'] . '&amp;pp=' . $profilegallery_per_page;
	$profilegallery_pagenav = construct_page_nav($profilegallery_page_num, $profilegallery_per_page, $profilegallery_total_rows, $profilegallery_sort_url, '');
	$profilegallery_show['pagenav'] = ($profilegallery_total_rows > $profilegallery_max_page) ? 1 : 0;

	require_once(DIR . '/includes/adminfunctions.php');

	$profilegallery_canadmin = 0;
	if (can_administer('canadminusers'))
	{
		$profilegallery_canadmin = 1;
	}

	$profilegallery_fileinfos = $db->query_read("
		SELECT fileid, filename
		FROM " . TABLE_PREFIX . "pg_profile_gallery
		WHERE userid = " . intval($userinfo['userid']) . "
		ORDER BY dateline DESC
		LIMIT $profilegallery_lower_limit, $profilegallery_per_page
	");

	while ($profilegallery_fileinfo = $db->fetch_array($profilegallery_fileinfos))
	{
		$profilegallery_cntbits ++;

		$profilegallery_filelocation = './images/profilegallery/' . $userinfo['userid'] . '/' . $profilegallery_fileinfo['filename'];
		$profilegallery_filespecs = getimagesize($profilegallery_filelocation);
		$profilegallery_thumbwidth = ($profilegallery_filespecs[0] > 100) ? 100 : $profilegallery_filespecs[0];

		$profilegallery_fileinfo['filename'] = urlencode($profilegallery_fileinfo['filename']);

		eval('$profilegallery_picbits .= "' . fetch_template('profilegallery_picbit') . '";');

		if ($profilegallery_cntbits % 5 == 0)
		{
			$profilegallery_picbits .= '</tr><tr>';
		}
	}

	$db->free_result($profilegallery_fileinfos);

	$profilegallery_picbits = eregi_replace(preg_quote('</tr><tr>') . '$', '', $profilegallery_picbits);

	while ($profilegallery_cntbits % 5 != 0)
	{
		$profilegallery_picbits.= '<td class="alt2" align="center" width="' . $profilegallery_tdwidth . '%">&nbsp;</td>';
		$profilegallery_cntbits ++;
	}

	$vbulletin->templatecache['MEMBERINFO'] = str_replace(
		'$navbar',
		'$navbar
		$profilegallery_piclist',
		$vbulletin->templatecache['MEMBERINFO']
	);

	eval('$profilegallery_piclist = "' . fetch_template('profilegallery_piclist') . '";');
}]]></phpcode>
I'd like it moved somewhere in User CP, specifically the Profile Picture part, if not though I'm up for anywhere in User CP.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01117 seconds
  • Memory Usage 1,786KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete