PDA

View Full Version : My First MOD - (Diary)


dizzynation
12-28-2013, 12:31 AM
I am creating a mod that uses memberaction_dropdown and I have everything done expect for the fact I cannot get vb to call the users profile in the -

This is an example of the direction I was trying to go in the memberaction_dropdown template but the "src" is not calling the profile pic

<img src="{vb:raw prepared.profilepicurl}" alt="" />

This is my last bit I need to finish and I will have a complete mod (First official mod from scratch!)

Will add whoever helps to "Supporter" area in modifications

ozzy47
12-28-2013, 12:33 AM
So you want the users avatar to appear in the dropdown?

dizzynation
12-28-2013, 12:54 AM
So you want the users avatar to appear in the dropdown?

Hey Ozzy, the member's profile image (or avatar I guess, I have tried both with no success)

ozzy47
12-28-2013, 01:07 AM
Just a silly question, why do you need it to show there, I am just tying to wrap my head around it, that's why I ask.

dizzynation
12-28-2013, 01:40 AM
Just a silly question, why do you need it to show there, I am just tying to wrap my head around it, that's why I ask.



Once I get this code right I am going to use my custom memberaction_dropdown_article template to use for vbcms_content_article_page and preview page.

I turned a vbulletin into a support ticket system, which everything is private except for articles and blogs.

So in articles, where it says "By *Name here" Publish Date - I dont want guests to go to the authors profile page, but I want them to see a little "blip" of who they are....

Hope that helps :)

ozzy47
12-28-2013, 02:00 AM
Take a look in the includes/block php files, and you can see how vB gets the avatars in the forum sideblocks. When I did vBDonate for DBTech, that is how I went about getting the avatars to show up. :)

dizzynation
12-28-2013, 02:23 AM
Take a look in the includes/block php files, and you can see how vB gets the avatars in the forum sideblocks. When I did vBDonate for DBTech, that is how I went about getting the avatars to show up. :)

Good, call and I had not checked out the block php files yet, Im there now and just realized that articles dont call any avatars/profile - I know that Blog.php does, maybe check there?

ozzy47
12-28-2013, 02:26 AM
The articles don't but the widgets do. blog.php may help as well.

dizzynation
12-28-2013, 02:31 AM
Im just at a dead end, found {vb:raw bbuserinfo.avatarurl}

Still no go.... :(

ozzy47
12-28-2013, 02:34 AM
You cant just use a variable, you need to fetch it from the DB, like they do in the block files, then you can call it. Only way to use a variable without calling it, is if it is already available.

dizzynation
12-28-2013, 02:41 AM
And this is where I begin to pull out my hair.

If the /block/ cmsarticle.php is not calling for avatars or profile pics then do I have to add custom php code to the php file?

ozzy47
12-28-2013, 02:42 AM
Yes that would be what you need.

dizzynation
12-28-2013, 05:42 PM
Anyone else have any ideas?

Would it be this code I need to add to cmsarticles.php?

" . ($this->registry->options['avatarenabled'] ? ",avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight" : "") . "

--------------- Added 1388257076 at 1388257076 ---------------

Might have found it

$fetch_userinfo_options = (
FETCH_USERINFO_AVATAR | FETCH_USERINFO_LOCATION |
FETCH_USERINFO_PROFILEPIC | FETCH_USERINFO_SIGPIC |
FETCH_USERINFO_USERCSS | FETCH_USERINFO_ISFRIEND
);

Edit* But it didnt work...

--------------- Added 1388258371 at 1388258371 ---------------

Ok good news, I got it to call the default avatar, but its not pulling the custom profile pic.

Making progress.