adding a banner code to all users without a sig

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

adding a banner code to all users without a sig

Post by TheButcher2 » Wed Feb 28, 2018 3:33 pm

Hi

Is there a way to ad a banner rotation code ( revive adserver) to all user profiles without a sig.

I did this on a former script I was using, it was am "if" conditional statement.


Here is the code I was using on the other script.

Code: Select all

<if condition="$post['signature']">
		<!-- sig -->
			<div>
				__________________<br />
				$post[signature]
			</div>
		<!-- / sig -->
		<else />
			<div>
				__________________<br />
				DEFAULT SIG STUFF HERE
			</div>
		</if>



If you can tell me which template has the sigs code that would be nice, I might go try messing around there.


Thanks

User avatar
warmweer
Registered User
Posts: 963
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: adding a banner code to all users without a sig

Post by warmweer » Wed Feb 28, 2018 4:58 pm

TheButcher2 wrote:
Wed Feb 28, 2018 3:33 pm
...
If you can tell me which template has the sigs code that would be nice, I might go try messing around there.
Just search for the specific term in the template directory.

Seeing the number of changes your are planning to implement, you're going to have a lot of work with each update.

edit: changed look to lot
Last edited by warmweer on Wed Feb 28, 2018 5:19 pm, edited 1 time in total.
A bug is a feature that hasn't made it to the manual (yet)

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Wed Feb 28, 2018 5:14 pm

warmweer wrote:
Wed Feb 28, 2018 4:58 pm
TheButcher2 wrote:
Wed Feb 28, 2018 3:33 pm
...
If you can tell me which template has the sigs code that would be nice, I might go try messing around there.
Just search for the specific term in the template directory.

Seeing the number of changes your are planning to implement, you're going to have a look of work with each update.

May I ask, is the sig for uses on one template or multiple templates.

And may I know which template(s) to look at please.


Peace

User avatar
warmweer
Registered User
Posts: 963
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: adding a banner code to all users without a sig

Post by warmweer » Wed Feb 28, 2018 5:25 pm

TheButcher2 wrote:
Wed Feb 28, 2018 5:14 pm
And may I know which template(s) to look at please.
warmweer wrote:
Wed Feb 28, 2018 4:58 pm
Just search for the specific term in the template directory.
It takes just as long for me to do, as it takes you to do the search yourself - it matter of selecting your directory and performing a text search.
I (and others) are willing to help if possible, but such a standard operation should be done by you.
A bug is a feature that hasn't made it to the manual (yet)

User avatar
Lumpy Burgertushie
Registered User
Posts: 64064
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: adding a banner code to all users without a sig

Post by Lumpy Burgertushie » Wed Feb 28, 2018 5:31 pm

if you mean styles, then the signature will show in all styles if you have allowed it from the admin panel/permissions etc. and the user chooses to create a signature.

if you really mean "template" then there are a couple of different html files that include the signature code.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Wed Feb 28, 2018 5:57 pm

warmweer wrote:
Wed Feb 28, 2018 5:25 pm
TheButcher2 wrote:
Wed Feb 28, 2018 5:14 pm
And may I know which template(s) to look at please.
warmweer wrote:
Wed Feb 28, 2018 4:58 pm
Just search for the specific term in the template directory.
It takes just as long for me to do, as it takes you to do the search yourself - it matter of selecting your directory and performing a text search.
I (and others) are willing to help if possible, but such a standard operation should be done by you.
I did search before starting the thread, came up blank. I don't start threads before doing a google and phpbb search unless I have to. Thanks for your reply it really did not help me out or impress me. I have been in the business 20 years this May and run a very successful adult webmasters board for the past 14 years, I can do search before asking a question. Have a good day.

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Wed Feb 28, 2018 5:58 pm

Lumpy Burgertushie wrote:
Wed Feb 28, 2018 5:31 pm
if you mean styles, then the signature will show in all styles if you have allowed it from the admin panel/permissions etc. and the user chooses to create a signature.

if you really mean "template" then there are a couple of different html files that include the signature code.


robert

I am assuming there is a template where the sig is called or maybe more than one template. Can you please tell me which template or templates to go look into to add the code I want added.

Thansk
Last edited by TheButcher2 on Wed Feb 28, 2018 6:18 pm, edited 1 time in total.

User avatar
warmweer
Registered User
Posts: 963
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: adding a banner code to all users without a sig

Post by warmweer » Wed Feb 28, 2018 6:16 pm

TheButcher2 wrote:
Wed Feb 28, 2018 5:57 pm
I did search before starting the thread, came up blank. I don't start threads before doing a google and phpbb search unless I have to. Thanks for your reply it really did not help me out or impress me. I have been in the business 20 years this May and run a very successful adult webmasters board for the past 14 years, I can do search before asking a question. Have a good day.
Strange, I just opened the most logical template where a signature could be found, and a miracle: it's there.
That must have been a lucky shot: yet I tried to see if there were more in the prosilver directory, and another miracle: 8 in the html and 5 in the css.
But anyway, since you've searched and those 20 years (or 14) carry a lot of weight, who am I to do better than Google or phpBB search so I'll just accept that my eyes must have deceived me.
A bug is a feature that hasn't made it to the manual (yet)

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Wed Feb 28, 2018 6:20 pm

warmweer wrote:
Wed Feb 28, 2018 6:16 pm
TheButcher2 wrote:
Wed Feb 28, 2018 5:57 pm
I did search before starting the thread, came up blank. I don't start threads before doing a google and phpbb search unless I have to. Thanks for your reply it really did not help me out or impress me. I have been in the business 20 years this May and run a very successful adult webmasters board for the past 14 years, I can do search before asking a question. Have a good day.
Strange, I just opened the most logical template where a signature could be found, and a miracle: it's there.
That must have been a lucky shot: yet I tried to see if there were more in the prosilver directory, and another miracle: 8 in the html and 5 in the css.
But anyway, since you've searched and those 20 years (or 14) carry a lot of weight, who am I to do better than Google or phpBB search so I'll just accept that my eyes must have deceived me.


Instead of being a smart ass why carry on and not say which template(s) to look into.

User avatar
warmweer
Registered User
Posts: 963
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: adding a banner code to all users without a sig

Post by warmweer » Wed Feb 28, 2018 6:24 pm

TheButcher2 wrote:
Wed Feb 28, 2018 6:20 pm
Instead of being a smart ass why carry on and not say which template(s) to look into.
I won't because it takes a lot more time for me to open my phpBB directory, search for the terms, copy everything to here than you need to get the answer.
I'll give you a hint though. Search for the word "signature".
Seriously, it's not rocket science.

edit: I'm not going to reply on this matter anymore
A bug is a feature that hasn't made it to the manual (yet)

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Wed Feb 28, 2018 6:28 pm

warmweer wrote:
Wed Feb 28, 2018 6:24 pm
TheButcher2 wrote:
Wed Feb 28, 2018 6:20 pm
Instead of being a smart ass why carry on and not say which template(s) to look into.
I won't because it takes a lot more time for me to open my phpBB directory, search for the terms, copy everything to here than you need to get the answer.
I'll give you a hint though. Search for the word "signature".
Seriously, it's not rocket science.


Thank you for nothing. You are the first person I have encountered on this forum who is absolutely not worth wasting time reading his/her replies. I'll not bother to reply to you and waste my time.

Quoting you "I just opened the most logical template where a signature could be found, and a miracle: it's there." you could have simply named the template instead of carrying on.

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Thu Mar 01, 2018 6:47 pm

Anyone else want to chime in on this in a positive light please

User avatar
posey
Registered User
Posts: 699
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: adding a banner code to all users without a sig

Post by posey » Fri Mar 02, 2018 5:32 pm

Not sure what file you're editing, but guessing from the $post['signature'] in your initial post, I am guessing the viewtopic

Then if you look at line 356 you see:

Code: Select all

<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ENDIF -->
So you can change that to:

Code: Select all

<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ELSE -->User has no signature<!-- ENDIF -->
or if you want to use the TWIG syntax:

Code: Select all

{% if postrow.SIGNATURE %}<div id="sig{{ postrow.POST_ID }}" class="signature">{{ postrow.SIGNATURE }}</div>{% else %}User has no signature {% endif %}
''I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking. And I plan on finding out what that is.''

TheButcher2
Registered User
Posts: 338
Joined: Tue May 13, 2014 11:38 pm
Contact:

Re: adding a banner code to all users without a sig

Post by TheButcher2 » Fri Mar 02, 2018 10:22 pm

posey wrote:
Fri Mar 02, 2018 5:32 pm
Not sure what file you're editing, but guessing from the $post['signature'] in your initial post, I am guessing the viewtopic

Then if you look at line 356 you see:

Code: Select all

<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ENDIF -->
So you can change that to:

Code: Select all

<!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ELSE -->User has no signature<!-- ENDIF -->
or if you want to use the TWIG syntax:

Code: Select all

{% if postrow.SIGNATURE %}<div id="sig{{ postrow.POST_ID }}" class="signature">{{ postrow.SIGNATURE }}</div>{% else %}User has no signature {% endif %}


Thank you for taking your time to reply posey, I appreciate it, been beating my head against the wall for days over this one.
If I may so bold as to ask you another question, where exactly in that code do i place the revive adserver code to rotate sigs.

Code: Select all

<!-- Revive Adserver Asynchronous JS Tag - Generated with Revive Adserver v4.1.1 -->
<ins data-revive-zoneid="15" data-revive-id="864eedad1018cf1e172763ffa26ea7a6"></ins>
<script async src="//www.sponsor.chat/ads/www/delivery/asyncjs.php"></script>

I tried all sorts of places and cleared the forum cache but could not see the text ad.

Thank you kindly

User avatar
posey
Registered User
Posts: 699
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: adding a banner code to all users without a sig

Post by posey » Fri Mar 02, 2018 11:30 pm

TheButcher2 wrote:
Fri Mar 02, 2018 10:22 pm
Thank you for taking your time to reply posey, I appreciate it, been beating my head against the wall for days over this one.
That doesn't really sound head-friendly .. :exploding_head:

Anyways, I have no clue what that script is, what it does and how it works. So that's rather hard for me to tell/explain to you.
However, if you look at the examples I gave you, I included the User has no signature, so I am guessing that's where you want to put it.
I think (and I am just guessing here) that you put the <ins>...</ins> inside the no-sig location and the <script>...</script>-line within the <head>...</head> of your overall_header.html, as it only has to be included once.

And just to clarify, these changes only affect the 'view topic' page.
There are a lot more pages that use a user's signature (eg. memberlist_view.html, ucp (pm's and "edit signature"), etc..).

Best of luck,
''I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking. And I plan on finding out what that is.''

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: posey and 5 guests