@baris Didn't work. I will use type="date".
Thanks.
Best posts made by Dinendal
-
RE: Jquery datepicker
-
Sign in via Firebase
Hi,
I've tried a lot of plugins and different configurations, but i can't find a solution.
I just want to permit to my users to sign in on my forum via Firebase authentication.Is there anyone there who already do this and could explain to me ?
Thanks.
Dinendal.
Latest posts made by Dinendal
-
RE: Profile item visibility vs access right
@PitaJ It seems that app.user store the current user informations.
But I want the informations of the user profile that I chose to show/visit.
-
RE: Profile item visibility vs access right
@Dinendal
So we can do this :var uidProfile = data.req.res.locals.uid; console.log("\nProfile UID :"+uidProfile); User.getUserField(uidProfile, 'userslug', function(err, userslug) { console.log("\nUserslug :"+userslug); });
Now I'm searching if there's another way to get this var than sending this with socket.
I saw some [[global...]] tags in tpl files whose are probably the answer. -
RE: Profile item visibility vs access right
Find out the answer to my main question :
In the Controllers.render I have forgotten this piece of code :if (res.locals.uid !== req.user.uid) { return res.render('403', {}); }
Still searching for these questions :
- How to get the uid and userslug (not the current user but the profile user) on my new page ?
- Same question for the uid on server side (in my plugin code)
-
Profile item visibility vs access right
Hello,
I created a plugin that add an item in the profile menu :
plugin.addProfileItem = function (data, callback) { data.links.push({ id: 'myplugin', route: 'myplugin', icon: 'fa-bar-chart', name: "My Plugin", visibility: { self: true, other: true, moderator: true, globalMod: true, admin: true, } }); callback(null, data); };
The purpose is to allow other users to see the new page of the user of their choice.
With the visibility attribute, other users see the item in the menu but when they click on it :Access Denied You seem to have stumbled upon a page that you do not have access to.
My main question is : Where could I set up access rights in this case ?
Two more questions :
- How to get the uid and userslug (not the current user but the profile user) on my new page ?
- Same question for the uid on server side (in my plugin code)
-
RE: Jquery datepicker
@baris Didn't work. I will use type="date".
Thanks. -
RE: Jquery datepicker
@baris It's working when I reload but it's not working on the initial load
@julian I'm using a text type because date type seems to be in DD/MM/YYYY format and I want to force MM/DD/YYYY format for international users (it's maybe depend of navigator language config). Also, the skin of date-picker looks better. I'm open to solutions for these 2 problems eventually (i'm going to do some research about that).
-
RE: Jquery datepicker
@baris
I tried your solution by doing this :$(window).on('action:ajaxify.end', initDate()); function initDate(){ app.loadJQueryUI(function () { $( "#filter_date1" ).datepicker(); $( "#filter_date2" ).datepicker(); }); }
and got this error on the $(window) line :
Uncaught ReferenceError: $ is not defined
-
Jquery datepicker
Hi everybody,
I have created a plugin to add a page in the user profile.
I have added an item in the profile menu to go to this page and it works fine.
When I click on this item my page is correctly loaded with my custom tpl where i write :app.loadJQueryUI(function () { $( "#filter_date1" ).datepicker(); $( "#filter_date2" ).datepicker(); });
This code define 2 fields with a calendar to allow user to filter informations on this page.
But if I reload the page pressing "F5" for example, there is this error :Uncaught TypeError: app.loadJQueryUI is not a function
Could someone explain to me what's the difference in nodebb process, why this error occur and how to fix this please ?
Thank you.
Dinendal.