Hi everybody!
I wonder: from developer's point of view can I create a module, which make weblinks visible only for topic starter and moderations for specified topics?
I prefer to make a workaround and use nginx webserver secure link module in order to make a temp weblinks, but want to know more about ElkArter internals either :D
You can create a module which hooks in to the bbcode parser. Then have a permission which allows what you want and check on that or return an empty string if no permission.
Where in the sources can I get example of BBCodes parser? Point me the right way, please.
Probably better looking at an addon. https://addons.elkarte.net/bbc/BBC-Move.html
That one is a simple example.
Hi @tino!
Is there a function to check that some user is topicstarter of topic?
The topic ID might be passed as an argument to that function for example.
The last is just my suggestion. Would you like to advice me?
You can run a sql query and get the data. That’s probably the most reliable way. The topic id should be available on the bbc parser section either in the $topic global or in context
Make raw SQL requests inside the modules considered a good practice in ElkArte or you've SQL-wrappers for that?
Unfortunately, I don't see much in the dev documentation.
You generally put them in the subs files and use the database() instance. Or you can just use the database() instance in the controller if you’re lazy.
Allow me first of all, @tino, to express heartfelt thanks about your willingness to help and pretty quick replies :-)
Although all seems to be doable, but I've already changed my approach to the problem.
Details placed below.
Give me please starting point how to implement following idea: I want to attach viewing post content capability of certain post to user speficified in the post's properties or list of users.
I need RTFM-kick.
I’m not sure I follow?
You can use the permissions to only allow people to view certain boards, is this what you’re looking to do?
Yep, closely to what I want to achieve. Is it possible to implement "view post content" capability to single user or list of them?
And this "viewable" capability links the users to selected post.
Or it's not allowed due to DB schema?
Could I rewrite the permissions system to get wanted result, couldn't I ?
I've sent an example in PM, tino