cotonti.com : Moar questions ;) https://www.cotonti.com Laatste forum onderwerpen Cotonti en Sat, 07 Feb 2026 23:53:56 -0000 lukgoh #32798 Kingsley: 

if you change the type of field, base html should change accordingly, right? mine doesn't. They  save no content either. ;( but only with the pages, user xtrafields seem to function correctly.

I was wondering about this also... ]]>
Thu, 19 Jan 2012 22:57:47 -0000
Kingsley More questions.. about extrafields (pages)..

if you change the type of field, base html should change accordingly, right? mine doesn't. They  save no content either. ;( but only with the pages, user xtrafields seem to function correctly.

And in my forums with some sections the line Discussions: 0 Messages: 0 isnt displayed. No idea howcome :(

 And last but not least; how does the group.tpl work under siena?

]]>
Thu, 19 Jan 2012 21:03:17 -0000
lukgoh Ah resources, interesting. Thank you Dyllon.

Added 35 minutes later:

Just incase anyone else is interested in this http://www.cotonti.com/page/resource_strings

]]>
Wo, 18 Jan 2012 23:37:30 -0000
Dyllon The html output from the avatar tag comes from the plugin's resource file. If you open plugins/userimages/inc/userimages.resources.php on line 9 you find this:

$R['userimg_img'] = '<img src="https://www.cotonti.com/{$src}" alt="{$alt}" class="userimg {$class}" />';

That is where it comes from. In your case of modifying the size of the avatar you would use this css

#useravatar img.avatar {
	width:45px;
	height:45px;
}
]]>
Wo, 18 Jan 2012 23:24:03 -0000
pieter #32773 lukgoh:

I think it was looking in the core files, I saw how Cot builds its tags. 

$t->assign(cot_generate_usertags($urr, 'USERS_DETAILS_', '', true));

Without looking at it again I thought $urr carried stuff over to other parts. Anyways if in the database a users avatar is stored as a link to the image, so "datas/avatars/imagename.jpg" then the tag should only put out "datas/avatars/imagename.jpg" so I don't understand where it is getting the "<img src="" /> part from, to be able to just use the tag in your tpl file to display the image? It's a little confusing... 

]]>
Wo, 18 Jan 2012 18:13:08 -0000
Dyllon Wo, 18 Jan 2012 18:02:49 -0000 lukgoh Maybe one of the Cot developers can awnser this question, might help with my extension developments...

]]>
Wo, 18 Jan 2012 16:50:39 -0000
Kingsley Maybe they've set the img scr part as default for that particular tag? As long as I can remember the output is given that way (eversince seditio, cant remember if LDU had the same)

]]>
Wo, 18 Jan 2012 16:44:05 -0000
lukgoh I think it was looking in the core files, I saw how Cot builds its tags. 

$t->assign(cot_generate_usertags($urr, 'USERS_DETAILS_', '', true));

Without looking at it again I thought $urr carried stuff over to other parts. Anyways if in the database a users avatar is stored as a link to the image, so "datas/avatars/imagename.jpg" then the tag should only put out "datas/avatars/imagename.jpg" so I don't understand where it is getting the "<img src="" /> part from, to be able to just use the tag in your tpl file to display the image? It's a little confusing... 

]]>
Wo, 18 Jan 2012 16:42:01 -0000
Kingsley

again, it is Siena. The mistake I made was class instead of id.

 

]]>
Wo, 18 Jan 2012 16:37:42 -0000
lukgoh Yeah, as I said for this to work:

<div id="useravatar">{USERS_DETAILS_AVATAR}</div>

The tag would have to output the image tags as well. I am guessing you are not using Siena because as far as I know tags do not output any html. 

Also I noticed you used this tag: {PHP.urr.user_name} I thought that would only load the username for who ever is logged in for some reason, but I checked and it doesn't on your site, which is also interesting. I guess I do not understand Cotonti as well as I thought. 

Well everyday is a school day, thanks for taking the time to paste this dude. 

Added 5 minutes later:

Also I noticed in your profile pages, example: user/demo if you have not selected a country or sex, etc it displays: 00 ---  |  you can tidy this up with the IF statments ;)

]]>
Wo, 18 Jan 2012 16:30:01 -0000
Kingsley Lé HTML

<div id="userid">

<div id="useravabox">
    <div id="useravatar">{USERS_DETAILS_AVATAR}</div>
</div>
<div id="usernamebox">
    <p style="font-size: 20px; margin-bottom:-18px; font-weight:bold;">{PHP.urr.user_name}</p><br />
    <p class="small" style="vertical-align:middle;">{USERS_DETAILS_COUNTRYFLAG} {USERS_DETAILS_COUNTRY} &nbsp;|&nbsp; {USERS_DETAILS_GENDER}</p>
</div>
<div>
    <hr class="userhr" />
    <p class="small" style="vertical-align:middle; text-indent: 5px;"><strong>Last seen:</strong> {PHP.urr.user_lastlog|cot_date('l, F d, Y', $this)} <strong>time:</strong> {PHP.urr.user_lastlog|cot_date('H:i', $this)}</p>
</div>

</div>

Lé CSS

#userid
    {
    line-height: 15px;
    padding: 15px;
    }
    
.userhr
    {
    border-top: 1px solid #d2d2d2; border-bottom: 1px solid #efefef; border-left:0px; border-right:0px; height: 1px; border-collapse: collapse;
    }
    
#useravabox
    {
    width: 45px; 
    float: left; 
    padding: 3px; 
    border: 1px solid #d2d2d2; 
    margin-bottom: 4px;
    }
    
#useravatar img
    {
    width: 45px;
    height: 45px;    
    }
    
#usernamebox
    {
    width: 655px; 
    float: right; 
    line-height: 23px; 
    border: 0px solid #000;
    }

Added 27 seconds later:

Replaced the code just now, cleaned it up a bit for you.

]]>
Wo, 18 Jan 2012 16:00:16 -0000
lukgoh Thats what I mean though, if you dont have to put <img src="https://www.cotonti.com/..." /> in your tpl file and you are only using a tag to display the avatar then the tag must output the html for it to work. would you mind just pasting the line of code for the avatar please?

]]>
Wo, 18 Jan 2012 14:20:31 -0000
Kingsley think the output isn't html at all, seeing you don't need to add <img scr"..."/>. and that's were I went wrong.

You telling me it should be an id, in stead of a class made me thinking and adjusting it, with a working result.

]]>
Wo, 18 Jan 2012 14:17:17 -0000
lukgoh So just so I understand you properly, the tag you are using is putting out html otherwise it wouldn't work? 

]]>
Wo, 18 Jan 2012 14:09:09 -0000
Kingsley You were very close Mr. Skywalker.. but the winner is:

the avatar img css with only the tag, so not the img scr part..

As you can see, now it works!

Thx for thinking along :) it's appriciated!!
 

Added 3 minutes later:

It's always nice when annoying little things that take way to much time are getting solved.. dunno, but it makes me smile and feel satisfied..
Now continuing work on teh theme!!
 

]]>
Wo, 18 Jan 2012 13:46:58 -0000
lukgoh Yeah I can't remember which of your css files I found it in. I think it was default.css or styles.css, something like that...

If you are giving it it's own div then you should try the method I gave you before, so if its like this: <div id="divname"><img src="https://www.cotonti.com/imge"></div> then in your css you would need to put it like this: #divname img {width: xxpx; height: xxpx;} at the very least you can see if any other styles in your css are conflicting, causing it to ignor your new style...

Added 1 minute later:

But also check the core files to make sure that what ever tag you are using is not putting out html, just to make sure, it doesn't look like it is... 

]]>
Wo, 18 Jan 2012 13:39:48 -0000
Kingsley #avatar{ width:35px; height:35px; } You found this in my css files? Cute, coz i cant find it..


Have changed it so that the avatar now has a div of it's own, but it's still not taking the dimensions I give it.
have to admit that I have nver succeeded with adapting the ava on user details on previous skins.

Will just remove it from there, and give it an place where it can has it's set dimensions.

]]>
Wo, 18 Jan 2012 13:19:13 -0000
lukgoh Yeah that makes sense. The only problem he is having is he cant resize the avatar but that is because as I said before the width and hight values are being set in the html...

Added 18 hours later:

I have to apologise Kingsley, I was looking at the wrong part like an idiot... 

Ok having a look at your css and html I can see you are setting the dimensions for the box the avatar image is inside but I can't see where you are setting the dimensions for the avatar image itself. As I set an avatar of 100 x 100px I can see that it pushes itself well out of the box set to 45 x 45px. 

#userava
    {
    float: left; 
    padding: 3px; 
    border: 1px solid #d2d2d2; 
    margin-bottom: 4px;
    }
    
.useravabox
    {
    width: 45px;
    height: 45px;
    }

So where can I find the css for the classes userimg and avatar? As one of these should have the dimensions you wish to set the image for...

Added 5 minutes later:

Okay, I found this:

#avatar{
  width:35px;
  height:35px;
}

This needs to be a class so swap # with .

Added 11 minutes later:

Or perhaps that is for something else altogether, I cannot tell... 

]]>
Di, 17 Jan 2012 18:26:34 -0000
uznik73 On my test site with siena work like this:

<img id="avatar" src="https://www.cotonti.com/{PHP.usr.profile.user_avatar}" />

and in css file use "#avatar {width:75px}" it works....

Добавлено 19 минут спустя:

No i dont see it after logout but if it need

<img id="avatar" src="
				<!-- IF {PHP.usr.profile.user_avatar} -->
				{PHP.usr.profile.user_avatar}
				<!-- ELSE -->
				themes/{PHP.theme}/img/blank.png
				<!-- ENDIF -->
				" alt="{PHP.L.Avatar}"  />

If user have avatar he see it, if not hel see img blank. And guests see blank avatar.. 

sorry for my English

]]>
Di, 17 Jan 2012 17:59:31 -0000
lukgoh oh, are you not using Siena? As {USERS_DETAILS_AVATAR} should put out: "datas/avatars/file.jpg" so yeah <img src="https://www.cotonti.com/{USERS_DETAILS_AVATAR}" width="xx" height="xx" /> that would work. 

Anyway after logging in and looking at your html code it is setting the width and hight in your html. You need to remove the width and height from the image tag.

Added 1 minute later:

<img src="https://www.cotonti.com/datas/defaultav/blank.png" alt="Avatar" width="75px" height="75px">

Added 1 minute later:

If the tag is producing HTML (Which it shouldn't) then you will need to edit the tag in it's php file (very minor core hack). 

]]>
Di, 17 Jan 2012 17:55:48 -0000
Kingsley Oops, was demo1.. corrected it, pass now is demo :)

<img src="https://www.cotonti.com/{USERS_DETAILS_AVATAR}" width="xx" height="xx" /> this would not work to begin with coz output in html would have been

<img src=" <<AVATARIMAGE>> width="xx" height="xx" />

so no, never use this combo

It was, however, when I used that other tag I mentioned {PHP.urr.user_avatar} but that was before you told me that that one only works for the durrent logged in user..

]]>
Di, 17 Jan 2012 17:36:10 -0000
lukgoh Sorry Kingsley, I couldn't log in with those details but I noticed for the default avatar the size is being set in its HTML, perhaps this is also happening with all avatars? 

Added 3 minutes later:

Is the avatar image like this in the tpl file: <img src="https://www.cotonti.com/{USERS_DETAILS_AVATAR}" width="xx" height="xx" /> because you would need to remove the width and hight values 

The only other thing I can think of is moving the id from your opening table tag  to the td tag just before the image tag...

]]>
Di, 17 Jan 2012 17:19:54 -0000
uznik73 Kingsley, try:

index.css

#user2 img {
height: 100px;
width: 100px;
}
]]>
Di, 17 Jan 2012 17:19:38 -0000
Kingsley Did it exactly like you said..

see for yourself..

www.killbox1alpha.nl

user: demo pass: demo

]]>
Di, 17 Jan 2012 16:02:22 -0000
lukgoh Can you pastebin your code?

Added 3 hours later:

Should be something like:

<div id="divname">{USERS_DETAILS_AVATAR}</div> then in your css: #divname img {width: xxpx; height xxpx;} 

or you could try:

<div id="divname" class="classname">{USER_DETAILS_AVATAR}</div> then in your css: .classname img {width: xxpx; height: xxpx;}

I am not sure why this wouldn't change the height and width of the avatar...

]]>
Di, 17 Jan 2012 09:58:56 -0000
Kingsley :( nope... avatar stays original size..

]]>
Di, 17 Jan 2012 00:44:53 -0000
lukgoh Your welcome.

]]>
Ma, 16 Jan 2012 19:48:52 -0000
Kingsley thx luke..

]]>
Ma, 16 Jan 2012 19:40:12 -0000
lukgoh Yeah I think you need to use {USERS_DETAILS_AVATAR} as I think {PHP.usr.profile.user_avatar} shows the avatar of the user that is logged in. If you want to adjust the height and width of the avatar you can place the tag inside a div and then using css to do something like: #divname img {height: XXpx; width: xxpx;} - I think that might be the best way to do it...

Luke.

]]>
Ma, 16 Jan 2012 17:19:35 -0000
Kingsley well, the problem is that the avatar doesn't show when a guest is visiting the profile page. Then the word avatar is displayed. Moment of logging in, it shows again.

Am using the tag: {PHP.usr.profile.user_avatar} because of the fact that I now can adjust the height and with of the avatar on the details page..

]]>
Ma, 16 Jan 2012 15:22:35 -0000
lukgoh You coul try something like: <-- IF {USERS_DETAILS_ID} == {PHP.user_id} (not sure if that's right.) --> custom block <-- ENDIF --> as for your avatar problem are you using the correct tag? Luke.

Added 2 minutes later:

Infact look at the Symisun03 theme. I am pretty sure it uses the if statements to show content if the logged in user is looking at their own profile...

]]>
Ma, 16 Jan 2012 14:50:48 -0000
Kingsley @ Pieter
 

will do that after ze theme is finished.

Added 1 hour later:

another question:

When logged out, the (user) avatar doesn't show on their profile page. Logged in, everything is fine. Any idea howcome?

Added 21 minutes later:

Oh, and I want a specific block only to appear when a user visits it's own profile page (for new p.m. amount and new profile message/new friend request
 

I guess I can achieve that with if/endif.. but dunno what kind of if/endif, clou plz.. ;)

]]>
Ma, 16 Jan 2012 09:29:45 -0000
pieter Maybe you can write a tutorial how you did it. Like I did for a gallery with PAGEAVATAR.

Put it here: http://www.cotonti.com/docs/plugin/

]]>
Ma, 16 Jan 2012 07:46:31 -0000
Kingsley well, actually, I've managed to fix this with html, css, a tag and the pageavatar plugin. Result will be shown shortly :)

It's a pretty nifty solution, if I say so myself. You will probably go: "Could've told ya that, dumbass!" but nevertheless.. xD

]]>
Ma, 16 Jan 2012 02:28:32 -0000
Trustmaster So you want something like "image roulette" for categories in the news. Each new page "shoots" next image from its category.

Kinda tricky. If you have as many images as pages in the cat, then using PageAvatar for each page is a better idea. But if you really want a roulette which turns another round if there are more pages than icons, then you need a plugin that would:

  • store comma separated URLs to images in configs for each category (like page module stores configs for each category with BEGIN_COT_EXT_CONFIG_STRUCTURE here);
  • hook into news (or pagetags), and for each page fetch an image from config and increase the roulette counter for its category;
  • whenever counter passes the number of images in its category, it starts again with 0.
]]>
Za, 14 Jan 2012 18:40:37 -0000
Kingsley I want to use an x amount of images for one (page) category. I want it to select the next image in line when a new page is added to a given category.

So when on my index and having 3 of the same category news items, they'll all show a different cat icon..

No clue on how I can achieve this, and how it's called ( <-this usally is my biggest problem).. so does anyone feel up to learning this dude some new stuff??

 

thx..

]]>
Za, 14 Jan 2012 17:21:38 -0000