Help > Photo Album URL

14 bài đăng
05.05.2016 / 13:36
JackSparrow
Bài đăng: 35
Member

Dear Developers. I was using at Profile User Album Photos. So i need now user seted at profile photo With this URL link

http://phonho.net/users/album. ... &view

i mean. If you are Created a Album and You upload where tow photo. If you set as profile your frist photo then i will visite your profile and Click at your seted photo then Direct open the URL

http://phonho.net/users/album. ... &view

05.05.2016 / 14:17
MrKen
Bài đăng: 2653
Trùm!
Vẫn là A N H

you want use photo in album as avatar?

05.05.2016 / 15:16
JackSparrow
Bài đăng: 35
Member

Yeah. And i am Removing to avatar system :D

05.05.2016 / 15:31
duongchung
Bài đăng: 352
Member
Cox Vô Tâm

Phố nhỏ k có phần dịch ngôn ngữ à

05.05.2016 / 15:32
MrKen
Bài đăng: 2653
Trùm!
Vẫn là A N H

dịch kiểu gì :)

05.05.2016 / 15:46
HuyAnh
Bài đăng: 1142
Member
https://www.facebook.com/boduyvidai9999/videos/219

Nauly smartphone gì củng có phần dịch cho nhé

05.05.2016 / 15:55
MrKen
Bài đăng: 2653
Trùm!
Vẫn là A N H

Open file: users\includes\album\show.php

Find:

PHP
  1. if ($user['id'] == $user_id && $view)
  2. echo ' | <a href="album.php?act=show&amp;al=' . $al . '&amp;user=' . $user['id'] . '&amp;view&amp;img=' . $res['id'] . '&amp;profile">' . $lng_profile['photo_profile'] . '</a>';

Replace with:

PHP
  1. if ($user['id'] == $user_id && $view)
  2. echo ' | <a href="album.php?act=show&amp;al=' . $al . '&amp;user=' . $user['id'] . '&amp;view&amp;img=' . $res['id'] . '&amp;profile">' . $lng_profile['photo_profile'] . '</a> | <a href="album.php?act=show&amp;al=' . $al . '&amp;user=' . $user['id'] . '&amp;view&amp;img=' . $res['id'] . '&amp;avatar">' . $lng['avatar'] . '</a>';

Find:

PHP
  1. if ($user['id'] == $user_id && isset($_GET['profile'])) {
  2. copy(
  3. '../files/users/album/' . $user['id'] . '/' . $res['tmb_name'],
  4. '../files/users/photo/' . $user_id . '_small.jpg'
  5. );
  6. copy(
  7. '../files/users/album/' . $user['id'] . '/' . $res['img_name'],
  8. '../files/users/photo/' . $user_id . '.jpg'
  9. );
  10. echo '<span class="green"><b>' . $lng_profile['photo_profile_ok'] . '</b></span><br />';
  11. }

Replace with:

PHP
  1. if ($user['id'] == $user_id) {
  2. if (isset($_GET['profile'])) {
  3. copy(
  4. '../files/users/album/' . $user['id'] . '/' . $res['tmb_name'],
  5. '../files/users/photo/' . $user_id . '_small.jpg'
  6. );
  7. copy(
  8. '../files/users/album/' . $user['id'] . '/' . $res['img_name'],
  9. '../files/users/photo/' . $user_id . '.jpg'
  10. );
  11. echo '<span class="green"><b>' . $lng_profile['photo_profile_ok'] . '</b></span><br />';
  12. } elseif (isset($_GET['avatar'])) {
  13. require('../incfiles/lib/class.upload.php');
  14. $handle = new upload('../files/users/album/' . $user['id'] . '/' . $res['img_name']);
  15. if ($handle->uploaded) {
  16. $handle->file_new_name_body = $user['id'];
  17. $handle->allowed = array(
  18. 'image/jpeg',
  19. 'image/png'
  20. );
  21. $handle->file_max_size = 1024 * $set['flsz'];
  22. $handle->file_overwrite = true;
  23. $handle->image_resize = true;
  24. $handle->image_ratio_crop = true;
  25. $handle->image_x = 32;
  26. $handle->image_y = 32;
  27. $handle->image_convert = 'png';
  28. $handle->process('../files/users/avatar/');
  29. if ($handle->processed) {
  30. echo '<div class="gmenu"><b>' . $lng_profile['avatar_uploaded'] . '</b></div>';
  31. } else {
  32. echo functions::display_error($handle->error);
  33. }
  34. }
  35. }
  36. }
05.05.2016 / 16:27
JackSparrow
Bài đăng: 35
Member

Oh my god :D Very lettal steps. Anyway i'll try and What Link i am using in Profile ?

05.05.2016 / 17:03
MrKen
Bài đăng: 2653
Trùm!
Vẫn là A N H
JackSparrow đã viết

Oh my god :D Very lettal steps. Anyway i'll try and What Link i am using in Profile ?

if you want to get link for using in Profile, creat a collumn in users table and save link to view

05.05.2016 / 18:19
JackSparrow
Bài đăng: 35
Member
MrKen đã viết

if you want to get link for using in Profile, creat a collumn in users table and save link to view

Sir you see. The code & SQL Calling to 4,Top Views Photo in Random 4 Limit,

$req = mysql_query("

SELECT `cms_album_files`.*, `users`.`name` AS `user_name`, `cms_album_cat`.`name` AS `album_name` $select

FROM `cms_album_files`

LEFT JOIN `users` ON `cms_album_files`.`user_id` = `users`.`id`

LEFT JOIN `cms_album_cat` ON `cms_album_files`.`album_id` = `cms_album_cat`.`id`

$join

WHERE $where

ORDER BY RAND() LIMIT 4");

and The Link Call to Direct in from users Comments & Voting menu,

echo '<a href="/users/album.php?act=show&amp;al=' . $res['album_id'] . '&amp;img=' . $res['id'] . '&amp;user=' . $res['user_id'] . '&amp;view"><img src="../files/users/album/' . $res['user_id'] . '/' . $res['tmb_name'] . '" width="60" height="60"/></a>';

i need same Caling URL link in User Profile :D