-
Adding Profile Phot and URL to view_video.tpl
Hey All -
Listen I am attempting to add the Profile photo and website URL of the person whon uploaded the video to show in the view_video.tpl
So far no go on photo -
On URL I found a thread here with an answer that did not work (for me or the original question holder) what I have so far is this.
Code:
{insert name=id_to_name assign=uweb un=$user_info[0].website}{$uweb}
or this:
Code:
{insert name=id_to_name assign=uweb un=$website}{$uweb}
My output I get is for either is:
Quote:
ERROR: Unable to execute query
SELECT `username` FROM `signup` WHERE `UID`=
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
So I have something happening, but obviously its not right - any help, suggestions?? Is buyscripts or an Admin around that might know the answer to this?
Thanks For any input - and YES I will post the answer if I figure it out.
- MTOD
-
Re: Adding Profile Phot and URL to view_video.tpl
I have not tried this yet, but it's worth a shot. Just tossing out ideas. Let me know if it works.
In user.tpl you'll find code relating to their URL which looks something like this:
You might have to stick that into the appropriate place on view_video.tpl?
For the photo, all it says in user.tpl is
Code:
[img]{$photo_url}[/img]
Not sure if just poking that into view_video.tpl will work or not.
-
Re: Adding Profile Phot and URL to view_video.tpl
grynmoors -
Thanks, but no I read about that in another posting - it does not work at all - that format requires something from the user.php so it will work in user.tpl. In other word just putting it in does not work :(
Any other ideas - Any chance the Admin (buyscripts) would give a hint - please :!:
-
Re: Adding Profile Phot and URL to view_video.tpl
Well, I wracked my brain and I give up.
I think it has something to do with the smarty/plug-ins stuff like this one:
Code:
{insert name=favour_count assign=favcount uid=$UID}
Favorites: {$favcount}
I think we just need to figure out what the insert name and assign name is for website and the photo, or at least how to create one in the smarty/plug-ins thing if it doesn't exist :?:
Something like this maybe:
:?: :?: :?:
I tried all kinds of things and either got a smarty (plug-in error) or mysql error.
-
Re: Adding Profile Phot and URL to view_video.tpl
grynmoors -
Thanks for trying - maybe an admin would help? At least I know I tried all I could think of, because I am getting the same errors.
This is really frustrating - because we must be close - but without a little assist from "buyscripts" I may be dead in the water on this.
Anyone else have any luck - I know that mhancoc7 has the user photo on the view_video.tpl, but mhancoc7 correct me if I an wrong - you said you are using two modified scripts - so not the same?
-MTOD
-
Re: Adding Profile Phot and URL to view_video.tpl
Yeah, he's using a combination of scripts. cl*p sh*re and vShare I believe.
I don't think admin or buyscripts visits this section of the forums very often if at all, leaving us to our own devices...and there's a saying, "Leave them alone long enough and they'll figure it out on their own." which might be coming into play. :?
-
Re: Adding Profile Phot and URL to view_video.tpl
To bad they dont check in here the best to better the script and layouts seem to come from here - lol
Well you might be right
Quote:
...and there's a saying, "Leave them alone long enough and they'll figure it out on their own."
- I figured I would take a day or two off from this problem and maybe go at it fresh on Wednesday this week, when I have some time to commit.
- MTOD
-
Re: Adding Profile Phot and URL to view_video.tpl
mahanoc said
Quote:
<a href="{$baseurl}/{$uname}">[img]{$baseurl}/photo/{$UID}.jpg[/img]
But of course! DOH!
I just have one thing to say besides Thank You:
Quote:
Leave them alone long enough and they'll figure it out on their own.
Now...for the user URL...
-
Re: Adding Profile Phot and URL to view_video.tpl
grynmoors -
Thanks I had to work in the real world for a few days -
Quote:
But of course! DOH!
I just have one thing to say besides Thank You:
???
Did you have any luck figuring this out? I will be working on it in the mean time.
- MTOD Erica
-
Re: Adding Profile Phot and URL to view_video.tpl
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.
-
Re: Adding Profile Phot and URL to view_video.tpl
Here is the complete right code, also url working..
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...
-
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
-
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
-
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
-
Re: Adding Profile Phot and URL to view_video.tpl
ramius -
Quote:
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
-
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).
-
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
-
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
-
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!
-
Re: Adding Profile Phot and URL to view_video.tpl
-
Re: Adding Profile Phot and URL to view_video.tpl
Quote:
Originally Posted by ramius
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!
The code you provided works to get their profile picture showing, is what you did make it so that a generic picture will show if the person has not uploaded one?
-
Re: Adding Profile Phot and URL to view_video.tpl
That's affermative grynmoors ;)
-
Re: Adding Profile Phot and URL to view_video.tpl
-
Re: Adding Profile Phot and URL to view_video.tpl
I'm revisiting this because I want to use the profile pics on the view_video.tpl
I haven't figured out how to get the no_pic.gif to display when no profile picture has been uploaded, but raimus, how did you mass rename the images? I have Vista and when I go to do it it does this: 1(2).jpg, 1(3).jpg...it puts the original name with the sequential number in a parenthesis.
-
Re: Adding Profile Phot and URL to view_video.tpl
OOPS, never mind, I found this handy little thing:
http://www.thefreewindows.com/?p=98
-
Re: Adding Profile Phot and URL to view_video.tpl
Quote:
Originally Posted by ramius
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!
I tried this. When I uploaded a new avatar, it was not overwritten. :/
-
Re: Adding Profile Phot and URL to view_video.tpl
Yes it is overwritten! I'm using it for a long time and it is working fine.. May be you need to reload the page or clear the cache of the browser? ;)
-
Re: Adding Profile Phot and URL to view_video.tpl
Tried that and even went into FTP to check the image and view it, it was still the default image. Weird, huh...
-
Re: Adding Profile Phot and URL to view_video.tpl
Permission CMOD of the folder? Is it right?
-
Re: Adding Profile Phot and URL to view_video.tpl
Oh definately.
It says "your upload was successful", yet the image doesn't get overwritten, which it *should* especially if a person decides to change their profile picture. I'll have to test this on all my sites and see what happens.
-
Re: Adding Profile Phot and URL to view_video.tpl
Well, it must be my scripts. I tried changing my profile pic on 2 sites that already have a profile pic uploaded and the profile pic wouldn't change, none of the profile pics were overwritten.
Yet the whole thing worked fine on a script for a site that I recently created....dam.
-
Re: Adding Profile Phot and URL to view_video.tpl
Here's another weird thing....I recently created 2 sites, the photos thing works on one but not the other! I'm stumped!
-
Re: Adding Profile Phot and URL to view_video.tpl
Really strange! i just setup a new site, I will check if it works or not there..
-
Re: Adding Profile Phot and URL to view_video.tpl
RAMIUS
I'm still having a problem. I just created a new vShare site and here's what's happening and what I'm doing...
User ID is 78.
There is no 78.jpg in photos, so I uploaded the modified "no_pic.gif" thingie by renaming it 78.jpg and uploading it with FTP. Image 78.jpg displays.
Went to vShare site and logged in as user and "upload new pic". Pic still displays as the original 78.jpg even though the url is /photo/78.jpg?38375. In essence, the 78.jpg is NOT getting overwritten.
Deleted 78.jpg with FTP.
Went to user profile to upload new pic. Uploaded new pic thru my_photo.php. Pic 78.jpg created BUT does not display. Checked photos directory for 78.jpg and it was there. I downloaded it with FTP and couldn't open it because it was saying "The file appears to be damanged or corrupt".
Is this a web host issue? I'll be contacting support just in case.
-
Re: Adding Profile Phot and URL to view_video.tpl
UPDATE:
Must have been either a server issue or a setting somewhere because my web host tech support fixed it on one of my sites and I've asked them to tell me what it is that they did to fix it so that I can do it myself ( if possible for future installations of vShare). I'm also asking them to check into the same issue for the rest of the vShare domains I have hosted with them since the other ones had the same problem.
-
Re: Adding Profile Phot and URL to view_video.tpl
To get profile photo....
{insert name=id_to_name assign=uname un=$UID}
{insert name=member_img UID=$UID}
To get website url....
{insert name=getfield assign=website field=website table=signup qfield=UID qvalue=$UID}
{if $website ne ""}Website: {$website|replace:'http://':''}{/if}
-
Re: Adding Profile Phot and URL to view_video.tpl
For the profile pic:
Code:
Fatal error: Smarty error: [in view_video.tpl line 210]: [plugin] could not load plugin file 'insert.get_member.php' (core.load_plugins.php, line 70) in /home/*****/public_html/*****/include/smarty/libs/Smarty.class.php on line 486
So I thought maybe I wasn't doing something right and got this
Code:
Fatal error: Smarty error: [in view_video.tpl line 212]: [plugin] could not load plugin file 'insert.get_member.php' (core.load_plugins.php, line 70) in /home/*****/public_html/*****/include/smarty/libs/Smarty.class.php on line 486
Here's the code that I do have that does work except it doesn't show the "no_pic.gif" if they have not uploaded one:
The code you posted for the URL works like a charm, however. THANKS!
-
Re: Adding Profile Phot and URL to view_video.tpl
I have rewritten my above post...
please check..
-
Re: Adding Profile Phot and URL to view_video.tpl
Thank you! That works!...except now for the other issue regarding profile pictures....they are distorted.
This happens with the friends profile pics too...they are distorted. How do we get their profile pics to display at a set size?
For example, the image on the profile page is displayed at 75 x 75 (or thereabouts...75 x 90 or something like that) and everywhere else it seems to be displaying at 120 x 90. Even though I have set the size in the database as suggested in another post by another user, it had no effect.
Profile page displays pic at 75 x 75 and everywhere else it is 120 x 90. See this page and notice how the image (which was uploaded and should display at 72px × 90px) is being shown at 120 x 90:
http://sca-video.com/view/79/whackamole ... et-part-3/
And since I have substituted all the .jpg images with what RAMIUS has suggested, I have no way of testing to see if the "image" is broken if the user has not uploaded a picture. Will it show the "no_image.gif" like it does on the profile page or will it show a broken image link? Can someone verify this?
-
Re: Adding Profile Phot and URL to view_video.tpl
I eventually try the new code... I don't realize why it want works for you...
I've also implemented in my ultimate site and it works really nice! :-|
You can check by yourself with and without uploaded picture (content suitable for eveyone, family and children): ;-)
http://www.tubeyourpet.com/view/134/dogs-love-water/
http://www.tubeyourpet.com/view/113/talking-dog-5/