Jump to content

Photo
* * * * * 1 votes

User Banner for Profile


  • Please log in to reply
32 replies to this topic

#21 Mamaiuke

Mamaiuke

    Level 2

  • Members
  • Level
  • 50 points
  • 46 posts

Posted 23 August 2010 - 04:02 AM

I was unable to successfuly make this work for accounts with IDs over 1000. Anyone got it working correctly? I posted the line which needs fixing a few posts up.
Can anyone with php knowledge take a look at it please?
Its mighty interesting for those of us who have people members and business as members.



He is right after the first 1000 member ID's it no longer works :( Sorry about that guys if anyone has a fix please let me know.

#22 jcgorospe

jcgorospe

    Level 2

  • Members
  • Level
  • 23 points
  • 46 posts
    • Gender:Male

Posted 27 August 2010 - 07:49 PM

Sorry, I was answering someone from a previous post... please delete post.

Edited by jcgorospe, 27 August 2010 - 07:50 PM.


#23 rufoqe

rufoqe

    Level 3

  • Members
  • Level
  • 18 points
  • 85 posts
    • Gender:Male
    • Location:usa
    • Software:SE 3.1x

Posted 11 September 2010 - 11:09 PM

Nice one, testing , thanx :lol:

#24 Hellboy

Hellboy

    Level 2

  • Members
  • Level
  • 8 points
  • 30 posts
    • Gender:Male

Posted 17 January 2011 - 04:01 PM

nice! thanks! +rep
Hellboy®

#25 Trancebook

Trancebook

    Level 1

  • Members
  • Level
  • 1 points
  • 15 posts
    • Gender:Not Telling
    • Location:Portugal

Posted 11 February 2011 - 04:28 PM

<script type="text/javascript">




If you are on a user profile and try to use the chat, this error is reported and browsers goes into a loop of cancelling the error; with it basically crashing the browser.


A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.




since i have this on global_header.tpl

Script: http://ajax.googleap...query.min.js:12
Trancebook.net - Your Psychedelic Network!!!

#26 MightyQ

MightyQ

    Level 2

  • Members
  • Level
  • 5 points
  • 44 posts

Posted 13 February 2011 - 03:15 AM

Heres the fix (WORKS PARTIALLY) I don't know how to do a "IF --- AND" state via SMARTY:

profile.tpl
under div id='usr banner' replace the default banner code with: This is for 5,000 users...
{if $owner->user_info.user_id < 1000}
<img id='ban_img' src='./uploads_user/1000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id < 2000}
<img id='ban_img' src='./uploads_user/2000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id < 3000}
<img id='ban_img' src='./uploads_user/3000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id < 4000}
<img id='ban_img' src='./uploads_user/4000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id < 5000}
<img id='ban_img' src='./uploads_user/5000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}

Uploadbanner.php ADD THIS BELOW if ($_FILES['photo']['type'] == "image/pjpeg" or $_FILES['photo']['type'] == "image/jpeg"){
if($user->user_info[user_id] < 1000) {
$folder=1000;
}
if($user->user_info[user_id] <= 2000 AND $user->user_info[user_id] >= 1000) {
$folder=2000;
}
if($user->user_info[user_id] <= 3000 AND $user->user_info[user_id] >= 2000) {
$folder=3000;
}
if($user->user_info[user_id] <= 4000 AND $user->user_info[user_id] >= 3000) {
$folder=4000;
}
if($user->user_info[user_id] <= 5000 AND $user->user_info[user_id] >= 4000) {
$folder=5000;
}

Uploadbanner.php find $target = AND REPLACE IT WITH:

$target = "uploads_user/".$folder."/".$user->user_info[user_id]."/"."banner_".$user->user_info[user_id].".jpg";

delbanner.php -- ADD THIS BELOW if (isset ($_REQUEST['uid']) and $_REQUEST['uid'] == $user->user_info[user_id]){
if($user->user_info[user_id] < 1000) {
$folder=1000;
}
if($user->user_info[user_id] <= 2000 AND $user->user_info[user_id] >= 1000) {
$folder=2000;
}
if($user->user_info[user_id] <= 3000 AND $user->user_info[user_id] >= 2000) {
$folder=3000;
}
if($user->user_info[user_id] <= 4000 AND $user->user_info[user_id] >= 3000) {
$folder=4000;
}
if($user->user_info[user_id] <= 5000 AND $user->user_info[user_id] >= 4000) {
$folder=5000;

delbanner.php change $target= to this:
$target = "uploads_user/".$folder."/".$user->user_info[user_id]."/"."banner_".$user->user_info[user_id].".jpg";

profile.php REPLACE ALL THE OLD BANNER CODE TO THIS:
// USER BANNER
if($owner->user_info[user_id] < 1000) {
$folder=1000;
}
if($owner->user_info[user_id] <= 2000 AND $owner->user_info[user_id] >= 1000) {
$folder=2000;
}
if($owner->user_info[user_id] <= 3000 AND $owner->user_info[user_id] >= 2000) {
$folder=3000;
}
if($owner->user_info[user_id] <= 4000 AND $owner->user_info[user_id] >= 3000) {
$folder=4000;
}
if($owner->user_info[user_id] <= 5000 AND $owner->user_info[user_id] >= 4000) {
$folder=5000;
}

if (file_exists("uploads_user/".$folder."/".$owner->user_info[user_id]."/banner_".$owner->user_info[user_id].".jpg")) {
$bannerexists = 1;
} else {
	$bannerexists = 0;
}

Edited by MightyQ, 13 February 2011 - 03:20 AM.


#27 MightyQ

MightyQ

    Level 2

  • Members
  • Level
  • 5 points
  • 44 posts

Posted 13 February 2011 - 04:22 AM

For profile.tpl use:
{if $owner->user_info.user_id < 1000}
<img id='ban_img' src='./uploads_user/1000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id <= 2000 && $owner->user_info.user_id >= 1000}
<img id='ban_img' src='./uploads_user/2000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id <= 3000 && $owner->user_info.user_id >= 2000}
<img id='ban_img' src='./uploads_user/3000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id <= 4000 && $owner->user_info.user_id >= 3000}
<img id='ban_img' src='./uploads_user/4000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}
{if $owner->user_info.user_id <= 5000 && $owner->user_info.user_id >= 4000}
<img id='ban_img' src='./uploads_user/5000/{$owner->user_info.user_id}/banner_{$owner->user_info.user_id}.jpg' border='0' align='absmiddle' style='max-height:120px; max-width:890px'/>
{/if}


IGNORE MY PROFILE.TPL update before this POST!!

#28 sglonti

sglonti

    Level 4

  • Members
  • Level
  • 14 points
  • 108 posts
    • Gender:Female

Posted 20 February 2011 - 11:00 PM

doesn't work at all...

#29 MightyQ

MightyQ

    Level 2

  • Members
  • Level
  • 5 points
  • 44 posts

Posted 21 February 2011 - 05:19 PM

doesn't work at all...


Works fine for me.

#30 brunetto

brunetto

    Level 1

  • Members
  • Level
  • 18 points
  • 7 posts
    • Gender:Male
    • Location:Italy
    • Software:SE 4.8.x

Posted 17 January 2012 - 12:35 PM

Add a banner to the top of your profile page.

Posted Image

SE-4??????




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


All the resources listed here are just for testing purpose and they shouldn't be used at any commercial environment without a valid license.
Those are for users who wants to try them before buy. Help the developer to build it better by purchasing them from original authors.