Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2018, 10:15 PM
DCD.RB DCD.RB is offline
 
Join Date: Jan 2011
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin 3 Request - Looking for Image Upload for Users

Hi,
I'm looking for a way for users to upload images to the server, and they're private to their accounts.

Example, if they were to upload 1-5 images (limit would set based on usergroup), it would upload to: /forum root/images/useruploads/USERID/Pics####.jpg/png/gif

Whether the images display somewhere; profile, usercp, etc
Is not important, but would be nice.

Does something like this already exist?

I tried this one:
https://vborg.vbsupport.ru/showthrea...rofile+Gallery

But it's not working properly.
Reply With Quote
  #2  
Old 06-29-2018, 10:46 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?t=307803" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=307803</a>
Reply With Quote
  #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
  #4  
Old 07-22-2018, 04:43 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Enhance what is built in.
https://vborg.vbsupport.ru/showthrea...ght=all+albums
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:42 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.03860 seconds
  • Memory Usage 2,192KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete