phpbb.alert is not working (/assets/javascript/core.js)

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
Post Reply
edzela
Registered User
Posts: 100
Joined: Thu Aug 28, 2014 10:00 am

phpbb.alert is not working (/assets/javascript/core.js)

Post by edzela »

Hi guys,
I will really thanks any help on this. I would like to know how to reference to this core.js to produce some alerts but still after couple of days i cannot do it.
I want to load this "event" in a <a> tag to get the phpbb.alert function but i cannot load in this tag.

my current code is like this

Code: Select all

<script>
$('a#attend').on('click', function() {
		phpbb.alert('title','message');
	});

Code: Select all

<li><a id="attend" name="attend" href="{event_id.U_ATTEND}"  title="{L_ATTEND}"><i class="icon icon-green fa-user-plus fa-fw" aria-hidden="true" ></i>{L_ATTEND}</a></li>
below:

Code: Select all

<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
in theory in running time should see in the inspector the word "event" together with this Tag but i cannot see it and i think this is the reason why phpbb.alert is not working.
But i see lines below the reference to this core.js but this function does not do nothing.

Code: Select all

<script src="./../../../assets/javascript/core.js?assets_version=2153"></script>
Please can you help what else to do?. I have phpbb 3.2.8

Thank you very much
Last edited by Mick on Wed Sep 16, 2020 7:07 am, edited 1 time in total.
Reason: Added code tags for clarity.
edzela
Registered User
Posts: 100
Joined: Thu Aug 28, 2014 10:00 am

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by edzela »

or maybe there is another way to send an phpbb.alert not necesarily using js.
I was trying and it is not working:

Code: Select all

<a id="attend" name="attend" href="{event_id.U_ATTEND}" onclick="phpbb.alert('titulo', ' prueba')" >


please help
User avatar
david63
Registered User
Posts: 18301
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by david63 »

Perhaps if you were to explain what you are trying to achieve rather than how you think it should be done we may be able to assist better.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
edzela
Registered User
Posts: 100
Joined: Thu Aug 28, 2014 10:00 am

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by edzela »

david63 wrote:
Tue Sep 15, 2020 5:48 pm
Perhaps if you were to explain what you are trying to achieve rather than how you think it should be done we may be able to assist better.
Hi,
I want a window popup like phpbb.alert when the a#href is executed. I saw coupple of code that is used with ajax like this:

Code: Select all

	'use strict';
	phpbb.addAjaxCallback('attend', function(res) {
		var tools = $('a[id^=attend_], a[id^=unattend_]');
		if (tools.is(':hidden')) {
			tools.show();
		}
		$(this).hide();
		phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
	});
but as i mentioned already, is not called any phpbb function like phpbb.addAjaxCallback o phpbb.alert
User avatar
kinerity
Community Team Member
Community Team Member
Posts: 2822
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Truscott
Contact:

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by kinerity »

Added the code BBCode to to your posts. Also, please keep in mind that we have a six hour bumping rule. All team members and community members here are volunteers, so we ask you to wait at least six hours before bumping your topic or, if no-one has replied to your last post, edit your last post. Thanks!
Kailey Truscott - Community Team
GitHub repositories (including un-released extensions)
edzela
Registered User
Posts: 100
Joined: Thu Aug 28, 2014 10:00 am

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by edzela »

thanks, please i will really appreciate your help.
edzela
Registered User
Posts: 100
Joined: Thu Aug 28, 2014 10:00 am

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by edzela »

Hi,
any help on this? I really will appreciate your help.
Thanks
User avatar
janus_zonstraal
Registered User
Posts: 4797
Joined: Sat Aug 30, 2014 1:30 pm

Re: phpbb.alert is not working (/assets/javascript/core.js)

Post by janus_zonstraal »

Maybe you have to explain more precisely what you are trying to achieve.
Sorry! My English is bat ;) !!!
Post Reply

Return to “phpBB Custom Coding”