• Welcome to Simple Machines Community Forum. Please login or sign up.
December 03, 2021, 03:04:37 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Add a new link into the mini profile

Started by wynnyelle, April 14, 2013, 09:33:29 PM

Previous topic - Next topic

wynnyelle

That worked.

You're a genius.

thank you so much!!

I have more stuff I need, but you've helped a while and I'll just start a new thread for that stuff.

hcfwesker

you're welcome.  I'm going to bed :D  good luck with the other stuff

wynnyelle

thank you :)

Okay, actually I'll continue this for anyone who knows, and wants to take a turn at this. There any way to make these links not show up at all if a member doesn't have a blog?

hcfwesker

Quote from: Groovystar on April 15, 2013, 01:57:05 AMThere any way to make these links not show up at all if a member doesn't have a blog?

cant tackle it right now, but since there are settings for this that each member has to activate it, then you'd just add an if state for it to not display for those who haven't activated it.  But, as i said,since i haven't seen the MOD or its files then I wouldn't know right off the top of my head.  It'd be something like

if(whatever the blog settings label is ) > 0 
echo'<dd><a href="', $scripturl, '?action=pmxblog;sa=view;uid=', $context['member']['id'], '"/><img src="', $settings['default_images_url'], '/blogicon.gif" /><strong>Blog</strong></a></dd>';

This is just randomnly giving an idea, do NOT literally use that code


Kindred

You should ask Feline what setting is set to determine if a user has an active  blog or not

then just use that in an if - then - else statement

if ($userblog!=0) {
echo 'blog display code';
} else {
echo 'link to create a blog';
}
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

wynnyelle

Thanks! Yeah this does need to be solved somehow since it is crating an error when someone tries to access a blog that isn't public, too, I think. I am not certain, but when I see the error again I will post it. Who is Feline, do you have their profile link?

Kindred

Feline is the author of the PMXBlogs mod
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

wynnyelle

Is she on this site?

I jioned the portamx site, and posted a bunch of questions there but didn't get a response.

hcfwesker

can you attach the mod zip here, i don't know if it's allowed, worse case scenario it'll be removed by a staff member but I'll have it downloaded before that happens and take a look at the files myself ( or post a direct link to the download page for this MOd you're working with).  Just know, the option you asked for in another topic about "activating blogs by default for members" will cancel out this option.  so you gotta choose one or the other, unless there's a work around

Kindred

no. Do not attach the mod.
The mod can be downloaded from the PMX github...


Once you identify what variable tells the system who has a blog and who does not, it's a pretty simple IF statement...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hcfwesker

googling "PMX github" brings up no links dealing with a blog/portal mod of any sort.

yeah, figured it'd be like... if blah blah = 1 "print blog link" else blah blah =0 "print link to activate blog" , the shorthand "gist" version lol

Chalky

Quote from: hcfwesker on April 15, 2013, 04:22:35 PM
googling "PMX github" brings up no links dealing with a blog/portal mod of any sort.

http://portamx.com/  The download link is at the top of the page ;)

hcfwesker

I got this at the top of my search...

PMX (Peter Marx) · GitHub
https://github.com/PMX

and since the mod author was referred to as a girl, I didn't think peter marx was the link lol.  looked down the search list and clicked the links but never found it. 

thanx for the direct link, I'll look into it later.

Chalky


wynnyelle

I just got in. If you can't find where the blog is downloaded I can go get the link I used.


hcfwesker

April 15, 2013, 04:39:23 PM #55 Last Edit: April 15, 2013, 04:50:17 PM by hcfwesker
I got it, but won't install on my 2.0.4 test forum.  looked at the settings file, and not being abe to see it on the page myself, best option for the IF statement I can pick out is 'blogenabled'
$txt['PmxBlog_blogenabled'] = 'Enable Blog: ';


<td align="right" width="45%" style="padding-top:10px;"><b>'. $txt['PmxBlog_blogenabled'] .'</b></td>
<td width="55%" style="padding-top:10px;">
<input class="check" name="blogenabled" type="checkbox" value="1"', isBlogEnabled() ? ' checked="checked"': '', ' />


I don't know if this is a member setting to activate their own blog, or admin setting to enable blogs for members

G-Star, give me a screencap of the member settings to activate their own blog


EDIT:::

NM, I found it, and Yes, the code I pasted above is for where member's select to Enable there Blog


wynnyelle

Oh so this code will set blogs and posts to auto-enabled and published by default? Thank you!

Uh...where do I put it? ^_^;;;

I have the blog's files open on my computer now. Just looking through them seeing what I can do, if anything.

wynnyelle

We got another problem with the blogs.

The blogs page {where all the blogs are listed} lists them in alphabetical order, apparently.

I am a bit in disbelief...this is a terrible idea. And before long, it's going to create serious problems. So...can I change this to most recently updated blogs being at the top? That really makes the most sense and seems to me like it would be fairly simple.

Kindred

hcfwesker,

I don't think that will work, because there is no ID included in that blog enabled check...  I think that is "did the admin turn on the blog feature" not "does this user have a blog"

Groovy

this has gone way beyond support of SMF and I am going to direct you to Feline now -- All further questions on how the PMXBlog works should be done on the PortaMX support site (especially since the mod is not even available for download from our mod site)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

hcfwesker

The code I posted was NOT meant for use, Groovystar ( read carefully and try not to get ahead of yourself and everyone else ;) ) .
Quote from: hcfwesker on April 15, 2013, 04:39:23 PMthe code I pasted above is for where member's select to Enable their Blog
I was just posting it to show the portion of code where members chose to "enable their blog" so we could gather an IF statement thing for your profile link.

And, yes, I agree, this goes way beyond SMF 2.X Support, kinda gettin out of hand for a custom MOD made available outside of SMF

Advertisement: