Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 50

Thread: Adding Profile Phot and URL to view_video.tpl

  1. #11
    Join Date
    Jan 2008
    Posts
    216

    Default Re: Adding Profile Phot and URL to view_video.tpl

    Here is the complete right code, also url working..

    Code:
    {insert name=id_to_name assign=uname un=$UID}
    [img]{$baseurl}/photo/{$UID}.jpg[/img]
    Now the only problem is when a user didn't upolad a picture... nothing is shown on Firefox but on IE the classic X of picture missing...

  2. #12
    Join Date
    May 2008
    Posts
    15

    Default Re: Adding Profile Phot and URL to view_video.tpl

    Quote Originally Posted by grynmoors
    The original poster was banned by admin for "promoting a non-vshare site" and all his posts have been deleted which blows because he posted a lot of very useful code and now it's all lost unless y'all happened to copy/paste any of it and kept it on file or applied it to existing templates.

    Here's the code he posted:

    He, too, has had trouble with the URL part. I think it's a lost cause.
    Well, this is getting annoying. My original username was banned (mhancoc7). I sent admin an email apologizing for anything that I did wrong and never got a response. So I opened a new username (thejesustv) and now admin is deleting my posts. I am not even sure why this one was deleted. Anyway, if you read this before admin deletes you will understand.

    Thanks, Jereme

  3. #13

    Default Re: Adding Profile Phot and URL to view_video.tpl

    JesusTV -

    Thank you for the assistance - and yes I must agree just because you have a modified site, it does not make your knowledge any less valuable.

    If you have any luck with the url portion, please let me know and I will be happy to send you a donation, for your efforts!

    I will also PM you about your one of your scripts (Carousel), I really like it, but I am wondering if it can be resized to a 300 or 325 width.

    -MTOD

  4. #14
    Join Date
    May 2008
    Posts
    15

    Default Re: Adding Profile Phot and URL to view_video.tpl

    Quote Originally Posted by mytakeondisney
    JesusTV -

    Thank you for the assistance - and yes I must agree just because you have a modified site, it does not make your knowledge any less valuable.

    If you have any luck with the url portion, please let me know and I will be happy to send you a donation, for your efforts!

    I will also PM you about your one of your scripts (Carousel), I really like it, but I am wondering if it can be resized to a 300 or 325 width.

    -MTOD

    Thanks!!

    Did you try ramius's code from above?

    I will check my PMs.

    Thanks, Jereme

  5. #15

    Default Re: Adding Profile Phot and URL to view_video.tpl

    ramius -
    Now the only problem is when a user didn't upload a picture... nothing is shown on Firefox but on IE the classic X of picture missing...
    Correct me if I am wrong - but can we place a default pic like /photo/no_pic.gif and use an "else" statement - to fix that issue?

    Code:
    <a href="{$baseurl}/{$uname}">[img]{$baseurl}/photo/{$UID}.jpg[/img] ELSE [img]{$baseurl}/photo/no_pic.jpg[/img]
    I am going to read the php manual section on the "else" command (sorry I know I am a total newbie - I need a book to learn) and see if I can figure a way around it - most likle a PHP guru here may have the answer, but I am going to try! :D

    -MTOD Erica

  6. #16
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: Adding Profile Phot and URL to view_video.tpl

    The thing ramius posted works...it puts up their profile picture with the link to their profile page, but not the website they mention in their profile. We're also trying to figure out how to get their website to appear.

    I'll also try the "else" statement,but where you have an "else" statement, you must also have an "if" statement (I believe).
    If it's not fun, stop doing it!

  7. #17
    Join Date
    May 2008
    Posts
    15

    Default Re: Adding Profile Phot and URL to view_video.tpl

    Quote Originally Posted by grynmoors
    The thing ramius posted works...it puts up their profile picture with the link to their profile page, but not the website they mention in their profile. We're also trying to figure out how to get their website to appear.

    I'll also try the "else" statement,but where you have an "else" statement, you must also have an "if" statement (I believe).
    Ok, I have got the users website on my View Video page as well as my View Picture/Audio pages.

    The problem is that it requires that you edit the /include/function.php file which is encoded.

    Here is the code anyway.

    Add to /include/function.php
    Code:
    function insert_id_to_website($id)
    
    {
    
            global $config,$conn;
    
    
    
            $sql="select website from signup where UID=$id[un]";
    
            $rs=$conn->execute($sql);
    
            return $rs->fields[website];
    
    }
    Add to /templates/view_video.tpl
    Code:
     {insert name=id_to_website assign=uwebsite un=$UID}
    
    {if $uwebsite ne ""}<center>My Website: {$uwebsite}</center>{else} {/if}

    This will display the Users website only if they have entered one. You need to be sure that the user does not inlcude the http://. I did this by putting a note next to the field when they initially add it.

    You can see it in action here.

    Again, this will NOT work on vshare unless someone knows how to pass different functions into the pages. For instance maybe we could save all of these new functions in a file named /include/extra_functions.php and then pass them into the view_video.php page. I am just not sure how to do that since the view_video.php file is also encoded. :(

    Jereme

  8. #18

    Default Re: Adding Profile Phot and URL to view_video.tpl

    grynmoors -

    Yes an IF statement is needed for the ELSE to work (or you kill the page - I have found that out - lol) - My little ones been sick the past two days so no time to work on that - but I will get to it tomorrow (Monday) and let you know what I found.

    thejesustv -

    What else can I say - incredible & awesome! I will plugin the code in the morning and let you know how it all works!

    -MTOD Erica

  9. #19
    Join Date
    Jan 2008
    Posts
    216

    Default Re: Adding Profile Phot and URL to view_video.tpl

    I have solved in a "drastic" way, just putted 3000 standard pictures on /photo/, batch renamed 1.jpg, 2.jpg, 3.jpg etc etc... So the script have the pictures to associate to users (first 3000) and when a user upload his picture automatically the default one is overwritten! ;)
    Rough but it works!

  10. #20
    Join Date
    May 2007
    Posts
    212

    Default Re: Adding Profile Phot and URL to view_video.tpl

    thanks for the code!

Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. all thumbs on a view_video
    By Ensyte in forum Template Modifications
    Replies: 4
    Last Post: 03-09-2009, 05:33 AM
  2. rearranging the view_video.tpl help
    By alanjoseph4 in forum Template Modifications
    Replies: 6
    Last Post: 09-12-2008, 01:35 PM
  3. Fatal Error in view_video.php
    By khsoh in forum Fixed Bugs
    Replies: 3
    Last Post: 11-03-2007, 07:58 AM
  4. Fatal Error in view_video.php
    By khsoh in forum Installation Support
    Replies: 0
    Last Post: 11-02-2007, 04:01 AM
  5. Table problem in view_video.tpl
    By Philthy in forum Fixed Bugs
    Replies: 0
    Last Post: 06-01-2007, 11:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •