[3.2][RC] Group Template Variables

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
mrgoldy
Jr. Extension Validator
Posts: 732
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [RC] Group Template Variables

Post by mrgoldy » Thu Oct 01, 2015 5:43 pm

Yeah it disappears, so I suppose it does get picked up.
I double checked myself, just to make sure, I am not in the Guest group somehow..
I double checked all group id's, they are standard (1 guests, 2 registered, 3 coppa, 4 mods, 5 admins, 6 bots)
I tried putting something in between
<!-- IF S_GROUP_2 -->Registered Members Only<!-- ENDIF -->
Just to make sure that some setting was adding everyone into the guests group and the members group, so we can view it the other way around. However, as a guest, it still shows up.

Disabled, re-uploaded, enabled. No change.
Formerly known as posey.
''Proud member of the Studio"

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20992
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] Group Template Variables

Post by RMcGirr83 » Thu Oct 01, 2015 5:52 pm

Is the anonymous user with in the registered users group?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
mrgoldy
Jr. Extension Validator
Posts: 732
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [RC] Group Template Variables

Post by mrgoldy » Thu Oct 01, 2015 5:56 pm

Yes he is, the only 'user' in there.
Formerly known as posey.
''Proud member of the Studio"

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20992
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] Group Template Variables

Post by RMcGirr83 » Thu Oct 01, 2015 5:58 pm

That makes no sense. The anonymous user should be in the guest group, all other users should be (at the least) in the registered users group.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

User avatar
martti
Registered User
Posts: 684
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Group Template Variables

Post by martti » Thu Oct 01, 2015 6:02 pm

I tried it myself now and it doesn't seem the template variables are available or get parsed in the Pages extension. <!-- IF S_GROUP_1 --> is seen as nothing more than a html comment.

User avatar
mrgoldy
Jr. Extension Validator
Posts: 732
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [RC] Group Template Variables

Post by mrgoldy » Thu Oct 01, 2015 6:13 pm

RMcGirr83 wrote:That makes no sense. The anonymous user should be in the guest group, all other users should be (at the least) in the registered users group.
Sorry, misread, thought you asked if he is in the Guest group. Hes alone in the guest group, he is not in teh registered users group.

And okay, thanks for confirming martti. Do you also happen to know a work around? :mrgreen: :roll:
Formerly known as posey.
''Proud member of the Studio"

User avatar
martti
Registered User
Posts: 684
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Group Template Variables

Post by martti » Thu Oct 01, 2015 6:15 pm

posey wrote:And okay, thanks for confirming martti. Do you also happen to know a work around? :mrgreen: :roll:
Issue a feature request at the Pages extension?

User avatar
mrgoldy
Jr. Extension Validator
Posts: 732
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [RC] Group Template Variables

Post by mrgoldy » Thu Oct 01, 2015 6:35 pm

I did some more digging and found this post.

Turns out you can use <!-- IF S_REGISTERED_USER -->but not in the page content itself, so you'll have to create a custom template. But this solves my issue.

Sorry for the inconvenience.
Formerly known as posey.
''Proud member of the Studio"

User avatar
mrgoldy
Jr. Extension Validator
Posts: 732
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: [RC] Group Template Variables

Post by mrgoldy » Tue Oct 20, 2015 10:58 am

Hello,

Sorry but I'm back, unfortunately :(.

I've got this extension enabled. I created a custom page onsale.php with onsale_body.html, and tried to use this extension to make it so only a few groups can see certain area's. See HTML page below:

Code: Select all

	<div class="panel bg1">
	<div class="inner">
		<div id='currently'>
		<!-- BEGIN sale_block -->
			<div class="panel <!-- IF sale_block.S_ROW_COUNT is odd -->bg2<!-- ELSE -->bg3<!-- ENDIF -->"><div class="inner">
				<table>
					<tbody>
						<tr><td colspan="3"><h2><img src="/images/sale.png" width="38px" height="15px"/> {sale_block.ITEM_NAME}</h2></td></tr>
						<tr>
							<td rowspan="5"><img src="{sale_block.ITEM_IMAGE}" /></td>
							<td style="text-align: right;"><span style="text-decoration: underline;"><strong>Sale Starts:</strong></span></td>
							<td>&nbsp;{sale_block.SALE_START_DATE} <em>at</em> {sale_block.SALE_START_TIME} <em>(EST)</em></td>
						</tr>
						<tr>
							<td style="text-align: right;"><span style="text-decoration: underline;"><strong>Sale Ends:</strong></span></td>
							<td>&nbsp;{sale_block.SALE_ENDS_DATE} <em>at</em> {sale_block.SALE_ENDS_TIME} <em>(EST)</em></td>
						</tr>
						<tr>
							<td style="text-align: right;"><strong><span style="text-decoration: underline;">Original Price</span>:</strong></td>
							<td>&nbsp;<span style="color: #ff0000; text-decoration: line-through;">{sale_block.ORIGINAL_PRICE}</span> <img src="/images/dime.png" width="10px" height="10px" /></td>
						</tr>
						<tr>
							<td style="text-align: right;"><span style="text-decoration: underline;"><strong>Sale Price:</strong></span></td>
							<td><span style="color: #008000;">&nbsp;{sale_block.SALE_PRICE} <img src="/images/dime.png" width="10px" height="10px" /></span></td>
						</tr>
						<tr>
							<td style="text-align: right;">&nbsp;<strong><span style="text-decoration: underline;">Crew Purchase:</span></strong></td>
							<td>&nbsp;{sale_block.CREW_SALE}</td>
						</tr>
					</tbody>
				</table>
			</div></div>
		<!-- END sale_block -->
		</div>
		<div id='latertoday'>
		<!-- IF not S_GROUP_11 -->
			<div class="rules">Unfortunately you're not allowed to view the up coming sales!</div>
		<!-- ELSE -->
		<!-- BEGIN sale_block_later -->
			<div class="panel <!-- IF sale_block_later.S_ROW_COUNT is odd -->bg2<!-- ELSE -->bg3<!-- ENDIF -->"><div class="inner">
				<table>
					<tbody>
						<tr><td colspan="3"><h2><img src="/images/sale.png" width="38px" height="15px"/> {sale_block_later.ITEM_NAME}</h2></td></tr>
						<tr>
							<td rowspan="5"><img src="{sale_block_later.ITEM_IMAGE}" /></td>
							<td style="text-align: right;"><span style="text-decoration: underline;"><strong>Sale Starts:</strong></span></td>
							<td>&nbsp;{sale_block_later.SALE_START_DATE} <em>at</em> {sale_block_later.SALE_START_TIME} <em>(EST)</em></td>
						</tr>
						<tr>
							<td style="text-align: right;"><span style="text-decoration: underline;"><strong>Sale Ends:</strong></span></td>
							<td>&nbsp;{sale_block_later.SALE_ENDS_DATE} <em>at</em> {sale_block_later.SALE_ENDS_TIME} <em>(EST)</em></td>
						</tr>
						<tr>
							<td style="text-align: right;"><strong><span style="text-decoration: underline;">Original Price</span>:</strong></td>
							<td>&nbsp;<span style="color: #ff0000; text-decoration: line-through;">{sale_block_later.ORIGINAL_PRICE}</span> <img src="/images/dime.png" width="10px" height="10px" /></td>
						</tr>
						<tr>
							<td style="text-align: right;"><span style="text-decoration: underline;"><strong>Sale Price:</strong></span></td>
							<td><span style="color: #008000;">&nbsp;{sale_block_later.SALE_PRICE} <img src="/images/dime.png" width="10px" height="10px" /></span></td>
						</tr>
						<tr>
							<td style="text-align: right;">&nbsp;<strong><span style="text-decoration: underline;">Crew Purchase:</span></strong></td>
							<td>&nbsp;{sale_block_later.CREW_SALE}</td>
						</tr>
					</tbody>
				</table>
			</div></div>
		<!-- END sale_block_later -->
		<!-- ENDIF -->
		</div>
However, no matter how I try to code it, it does not work. If I add <!-- IF S_GROUP_5 --> nobody can see it, not even I myself, eventhough I am in the Administrators group. if I set it up differently and make it so <!-- IF not S_GROUP_1 -->, guests can still see it.

So the question is, is there any specific thing I need to load in the php-file or something, as this is clearly not working as it should.

Cheers,
Formerly known as posey.
''Proud member of the Studio"

User avatar
stefd75
Registered User
Posts: 10
Joined: Sat Feb 20, 2016 1:39 pm

Re: [RC] Group Template Variables

Post by stefd75 » Sat Feb 20, 2016 1:43 pm

Hello !

i've this ext on 3.1.7 pl1
all is ok, but i don't understand why, it works everywhere but not in attachment.html !
do u you why ?

i test it in viewtopic_body it's ok, but not in attachment.hmtl

User avatar
martti
Registered User
Posts: 684
Joined: Thu Jul 31, 2014 8:23 am
Location: Belgium

Re: [RC] Group Template Variables

Post by martti » Sat Feb 20, 2016 3:40 pm

stefd75 wrote:Hello !

i've this ext on 3.1.7 pl1
all is ok, but i don't understand why, it works everywhere but not in attachment.html !
do u you why ?

i test it in viewtopic_body it's ok, but not in attachment.hmtl
I've updated the extension and it should work now. Thanks for reporting.

User avatar
stefd75
Registered User
Posts: 10
Joined: Sat Feb 20, 2016 1:39 pm

Re: [RC] Group Template Variables

Post by stefd75 » Sat Feb 20, 2016 4:48 pm

Perfect Martti ! it works
<3

Josvdwoude
Registered User
Posts: 2
Joined: Wed Dec 09, 2015 12:05 am
Location: Netherlands
Name: Jos van der Woude
Contact:

Re: [RC] Group Template Variables

Post by Josvdwoude » Wed Oct 12, 2016 10:00 am

Thank you for this add-on!

Was looking for something to only show new registered people, looks like you done it. Cheers!

User avatar
gianluigi.zanettini
Registered User
Posts: 104
Joined: Fri Sep 07, 2007 9:09 pm
Location: Ferrara, Italy
Contact:

Re: [RC] Group Template Variables

Post by gianluigi.zanettini » Sat Jan 07, 2017 11:00 pm

This extensions was a godsend for me, thanks!!

This is to report that it works great on phpBB 3.2 too ;)

User avatar
WelshPaul
Registered User
Posts: 252
Joined: Tue Aug 19, 2014 2:09 pm

Re: [RC] Group Template Variables

Post by WelshPaul » Mon Jan 09, 2017 7:53 pm

gianluigi.zanettini wrote:
Sat Jan 07, 2017 11:00 pm
This extensions was a godsend for me, thanks!!
Same! :)

I just tested this on 3.2 and it appears to work just fine. Was going to work on updating it for phpBB 3.2 otherwise. This is a must extension for my forum. :mrgreen:

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: hewmac06, ImagesGuru and 20 guests