Search Results for 'code'
-
Search Results
-
I’ve got a simple “php if snippet” I’m trying to get into loop-single-reply.php.
Here is an example of my snippet (used for a seperate membership script):
<?php require_once '/members/library/Am/Lite.php'; $user = Am_Lite::getInstance()->getUser(); ?> <?php if (Am_Lite::getInstance()->haveSubscriptions(364)) { ?> <span class='custom-user-donation-badge'>I've Donated!</span> <?php } else { // do the other thing ?> <?php } ?>I need the code snippet to show only in the profile area of the reply author, if it applies to them.
In other words: “show this if it applies and only show if it applies to this specific reply author.”
I’ve used these before for something similar:
$reply_user_id = bbp_get_reply_author_id(); $reply_user = new WP_User( $reply_user_id )I’m still leaning php and bbpress. Any suggestions on how I can wrap my code snippet with these bbpress statements? This way, my code snippet will only apply if it applies to the specific author.
Thanks for any suggestions.
Topic: Search isn’t working
I can’t find a search box activation option or short code for a search box. I have activated my theme’s own search function and it doesn’t pick up on words from within the forums pages. Do you have a forum search option?
Thank you for your time.
Take care,
KariReference site http://imapiece.com/
Ill start by saying im not a developer and can edit php and code, but I cant write it from scratch…. yet
So ive been moving a guild site over from phpbb into wordpress and am still trying to figure out the best way to handle applicants, I made a post here if anyone had any ideas about that
https://bbpress.org/?post_type=topic&p=181981So I was looking into how to maybe do a multisite with a single forum handling all the main communication among the community as a whole. I was looking through the forum here and everything that said it cant be done is very old. Is there a way to have shortcodes and custom user fields to work around that? Or maybe iframe?
Here is my thought, ill use car clubs for example
Root Forum
1 category – Car Club –
1-2 forum – public
1-3 forum – recruitment needs2 category – members only
2-2 forum – New Car Club Applicant
2-3 forum – Car Club Events
2-4 forum – ADMIN3 categories – (3) Honda – (4) Ford – (5) Mazda
3-2 forum – news rss
3-3 forum – brand specific newsOk, so lets say on the main site if someone goes there it pulls everything since its the root. But give the car club its own multisite along with any niche sub group. In the custom user groups have shortcodes associated with the different ranks to show them on their member page when they look at the info something like [bbp-single-forum id=$forum_id] and add more to the root of that ranks permission. That way you dont have to add them per user, but per rank per group.
so in the shortcode for public users they would only have access to 1 and its contents
people in the honda club who are just members would have access to 1, 2(excluding 2-4) and 3, once they get bumped up to admin rank in that group the shortcode to display 2-4 gets added since its connected to rank roles.In the same breath on the front end of the multisite pages you could just have them display the public forums associated with that niche pulling the data from the forum via [bbp-single-forum id=$id ].
I had a ton of control like this through phpbb using theme styling and domain masking and am trying to find a way to make it work in wordpress but its been a learning curve. I know groups in buddypress have some of this function built in, but it doesn’t seem to be tweak-able between sites. I dont want a guest to see every group in the opt in part of registration off the bat. Would rather have them app on that groups page, members review then they get added and what they see is based on what rank they have in all the groups they are in.
So am i trying to overthink this? Have I missed something that could solve this idea?
Thoughts/Suggestions?
Topic: Template notice text
Does anyone know how I can modify the template notice text?
Here’s the code for it:
<div class=”bbp-template-notice”>
<p>Your account has the ability to post unrestricted HTML content.</p>
</div>I would like to change what it says to “Please don’t post anything inappropriate! Our supervisors are invited to this forum.”
Or I’d like to just delete it altogether then have this sentence be a general forum notice. I’ve started looking through the php files with no luck so far… I wish they’d make it easier to change things like this in the front end of this plugin. My users don’t need to see this and half of them won’t know what it means. I’ve just changed the text and outline to white for now to hide it but it leaves a big empty space.
I wish I was more familiar with writing code on my own so I can just add it to the front end customizer.
Thanks so much for your time!!
Take care,
Kari