Not Solved [How To?] Cover image update forum php file / avatar setings using CustomField
#1
Not Solved
So, First I made on my forum a cover  for users profile.. I used customfield, and is working, you can set the cover forum your profile setings, but now I want to make a php file, actualy i made it with teamplete with everithing but i have a problem , I cant Update the cover:


1. You can update the cover using your profile ,
2. Now I'm trying to update from avatar sectiun in userCP, but I can't I dont know how to write it to worg! I have this:"
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->change_avatar}</title>
{$headerinclude}
</head>
<body>
{$header}
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table width="100%" border="0" align="center">
<tr>
	{$usercpnav}
	<td valign="top">
		{$avatar_error}
		<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
			<tr>
				<td class="thead" colspan="2"><strong>{$lang->change_avatar}</strong></td>
			</tr>
			<tr>
				<td class="trow1" colspan="2">
					<table cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>{$lang->avatar_note}{$avatarmsg}</td>
							{$currentavatar}
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td class="tcat" colspan="2"><strong>{$lang->custom_avatar}</strong></td>
			</tr>
			{$avatarupload}
			{$avatar_remote}		
			</table>

		
		
		<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
			<tr>
				<td class="thead" colspan="2"><strong>{$lang->cover}</strong></td>
			</tr>
			<tr>
				<td class="trow1" colspan="2">
					<table cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td>{$lang->cover_1}</td>
									
						</tr><div align="center"><input type="text" class="textbox" name="Cover"  value="{$userfields['fid5']}" /></div>
						<input type="submit" class="button" name="submit" value="Update Cover" />

					</table>
				</td>											

			</tr>

		</table>
		
		
		
		
		
		
		
		
		
		
		
		<br />
		<div align="center">

			<input type="hidden" name="action" value="do_avatar" />
			<input type="submit" class="button" name="submit" value="{$lang->change_avatar}" />
			{$removeavatar}
		</div>
		
	</td>
	
</tr>
</table>
</form>
{$footer}
</body>
</html>

3. I'm trying now using a php file, again is not working I cant make the "update button" to work

What I need is that I need something to let me update that secion of my custom filed ..


Useful links:
https://onegame.ro/usercp.php?action=avatar  usercp avar and cover edit
https://onegame.ro/cover.php  php file for editing the cover , is not working
https://onegame.ro/member.php?action=profile&uid=1   user with cover .. is woking from profile tab in user cp

The best way for me is making the cover to be eddited form avatar tab in userCP . that will be the best!
Reply
#2
Not Solved
(2018-04-19, 05:49 PM)LucifeR. Wrote: https://onegame.ro/cover.php  php file for editing the cover , is not working

Hi,

it's not working beacuse the form is not complete, you forgot to start the form:

Quote:<form enctype="multipart/form-data" action="usercp.php" method="post">

Try to add this before the lines:

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
            <tr>
                <td class="thead" colspan="2"><strong>{$lang->cover}</strong></td>
            </tr>
Reply
#3
Not Solved
well the problem is that i don't know to much php or html ..
What I want is to update a custom profile field from a php file , the custom id profile is :  {$userfields['fid5']}

I want to update it from a php file , in that field I enter a picture link , and that will become the cover image for user !
Reply
#4
Not Solved
For starters, I recommend RaetU's plugin if you figure out how to use it (you can say it is more "advanced" than average plugins).

As for your code.

You need to type a correct form, which:
* Should point to cover.php and not usercp.php
* The value for the "value" attribute is correct for cover.php
<input type="hidden" name="action" value="do_profile" />

Then we'd assume your PHP file is correct and I believe it should work.
Soporte en Español

[Image: signature.png]

Discord at omar.gonzalez (Omar G.#6117); Telegram at @omarugc;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)