Advertisement:

Author Topic: [Updated Plugin] Upload Profile Picture  (Read 142760 times)

bhatav

  • Newbie
  • *
  • Posts: 12
Re: [Updated Plugin] Upload Profile Picture
« Reply #150 on: November 18, 2016, 09:08:49 pm »
Not Working  :(

im using osclass 3.6.1 with oswizard theme

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1343
  • </html> the end is always near
Re: [Updated Plugin] Upload Profile Picture
« Reply #151 on: November 20, 2016, 07:37:33 pm »
what did not work exactly? i used it the same version and theme and all worked fine

jhosua

  • Newbie
  • *
  • Posts: 24
Re: [Updated Plugin] Upload Profile Picture
« Reply #152 on: November 20, 2016, 11:10:58 pm »
im trying make table list of user and company at a custom page.
and i use this plugin to show profile picture at my custom page.

when i use <?php profile_picture_show(); ?>
result =  no_picture.jpg image show in all profile

when i use code from here : http://forums.osclass.org/plugins-20/how-to-display-list-of-company-23215/
Code: [Select]
<?php echo '<img src="'.osc_base_url(true) . 'oc-content/plugins/profile_picture/images/profile'.$user['pk_i_id'].".jpg".".png".".gif".'"  .width="150px". height="150px" />' ' <a href="user/profile/'.$user['pk_i_id'].'">'$user['s_name'].'</a>' '<br /> ';?>result= picture not show

my question : how to show profile picture in custom page ?

my custom page :
Code: [Select]
<?php
    
/*
     *      Osclass – software for creating and publishing online classified
     *                           advertising platforms
     *
     *                        Copyright (C) 2014 OSCLASS
     *
     *       This program is free software: you can redistribute it and/or
     *     modify it under the terms of the GNU Affero General Public License
     *     as published by the Free Software Foundation, either version 3 of
     *            the License, or (at your option) any later version.
     *
     *     This program is distributed in the hope that it will be useful, but
     *         WITHOUT ANY WARRANTY; without even the implied warranty of
     *        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *             GNU Affero General Public License for more details.
     *
     *      You should have received a copy of the GNU Affero General Public
     * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
     */

    // meta tag robots
    
osc_add_hook('header','osclasswizards_nofollow_construct');

    
osclasswizards_add_body_class('page');
    
osc_current_web_theme_path('header.php') ;
?>

<div class="title">
  <h1><?php echo osc_static_page_title(); ?></h1>
</div>
<div>
<?php $user User::newInstance()->listAll(); ?>
<?php if (osc_total_users()>0) { ?>
    <table border="1" style="width:100%">
        <tr style="border:thin; border-color:#999; background-color:#CCC;">
            <th>Company</th>
            <th>Phone</th>
            <th>Location</th>
            <th>Register</th>
        </tr>
        <?php foreach ($user as $u) { ?>
            <?php  if($u["b_company"]==1) {?>
         
                <tr>
                    <th>
                    <?php echo '<img src="'.osc_base_url(true) . 'oc-content/plugins/profile_picture/images/profile'.$user['pk_i_id'].".jpg".".png".".gif".'"  .width="150px". height="150px" />' ' <a href="user/profile/'.$user['pk_i_id'].'">'$user['s_name'].'</a>' '<br /> ';?>
                        <a href="<?php echo osc_base_url(true) . '?page=user&action=pub_profile&id='.$u['pk_i_id']; ?>" >
                            <?php echo $u['s_name']; ?>
                        </a>
                    </th>
                    <th><?php echo $u['s_phone_mobile'] ;?></th>
                    <th><?php echo $u['s_country'] ;?></th>
                    <th><?php echo $u['dt_reg_date'] ;?></th>
                </tr>
            <?php ?>
        <?php ?>
    </table><br>
    <table border="1" style="width:100%">
        <tr style="border:thin; border-color:#999; background-color:#CCC;">
            <th>User</th>
            <th>Phone</th>
            <th>Location</th>
            <th>Register</th>
        </tr>
        <?php foreach ($user as $u) { ?>
            <?php  if($u["b_company"]==0) {?>
         
                <tr>
                    <th>
                    <?php echo '<img src="'.osc_base_url(true) . 'oc-content/plugins/profile_picture/images/profile'.$user['pk_i_id'].".jpg".".png".".gif".'"  .width="150px". height="150px" />' ' <a href="user/profile/'.$user['pk_i_id'].'">'$user['s_name'].'</a>' '<br /> ';?>
                        <a href="<?php echo osc_base_url(true) . '?page=user&action=pub_profile&id='.$u['pk_i_id']; ?>" >
                            <?php echo $u['s_name']; ?>
                        </a>
                    </th>
                    <th><?php echo $u['s_phone_mobile'] ;?></th>
                    <th><?php echo $u['s_country'] ;?></th>
                    <th><?php echo $u['dt_reg_date'] ;?></th>
                </tr>
            <?php ?>
        <?php ?>
    </table>

<?php ?>
</div>
<?php osc_current_web_theme_path('footer.php') ; ?>

sorry for my english i use translator
thanks much..
« Last Edit: December 01, 2016, 01:34:13 pm by jhosua »

Tolgas91

  • Newbie
  • *
  • Posts: 8
Re: [Updated Plugin] Upload Profile Picture
« Reply #153 on: May 19, 2018, 04:05:17 pm »
Hi Jesse,

I put the codes that you gave me in their places. but the plugin is not working. I added screenshots for a better understanding and my english some bad im sorry...  :(

I'm working with localhost and could this be the mistake?

Thank you for your help








Aficionado

  • issues
  • Hero Member
  • *
  • Posts: 6263
  • Hardliner
Re: [Updated Plugin] Upload Profile Picture
« Reply #154 on: May 19, 2018, 10:38:20 pm »
You realize this is a two years old topic ?

JAVIERSL70

  • Newbie
  • *
  • Posts: 9
Re: [Updated Plugin] Upload Profile Picture
« Reply #155 on: December 27, 2018, 10:53:13 am »
Hello good day,
the plugin is perfect, it just fails me on the page of the item.php, the logo is not shown.
In user-public-profile.php is OK
In user-items.php is OK
In user-public-profile is OK

Can somebody help me? I do not understand why it is not shown in item.php

JAVIERSL70

  • Newbie
  • *
  • Posts: 9
Re: [Updated Plugin] Upload Profile Picture
« Reply #156 on: December 28, 2018, 12:01:33 pm »
I have managed to solve the problem, I looked at the other page that looked correctly and the only difference is that they had the following code:

<?php View::newInstance()->_exportVariableToView('user', $user_keep); ?>

:-)

Tolgas91

  • Newbie
  • *
  • Posts: 8
Re: [Updated Plugin] Upload Profile Picture
« Reply #157 on: January 10, 2019, 07:11:51 pm »
I have managed to solve the problem, I looked at the other page that looked correctly and the only difference is that they had the following code:

<?php View::newInstance()->_exportVariableToView('user', $user_keep); ?>

Hi Javier, How did you handle this? can you help me with this? :/
:-)