I want to implement admin panel settings(coloring, theme, font, logo...) in Laravel project.
I have used limitless bootstrap admin panel for my project, laravel blade, and no front end framework such as vue.js or anything else.
The solution that I know, is that make a settings table which save colors and other settings.
But the problem is putting those data into css file, frequently fetching those data ....
My Question
Is there any better way to implement this?
If it is correct, how to handle the problems I mentioned?
To persist the data across devices or multiple sessions you would need to store them as database values. I will suggest you keep these values in a JSON data column in your SQL database mapped against a particular user id or so.
When a user logs in to the application check if he has a record for custom settings in the DB. If so, pull in that record (JSON data) and store it in the current session. Further in your HTML files use values from your session store to alter styling or logo or things you wish to change. This way you will limit DB query to the very first login request only.
An additional thing to note is you should update the session store values if in case the user updates these settings anything during his active session.
Note: Haven't implemented the same, just a wild guess that sounds ideal to me.
Related
I have implemented a website using Oracle Webcenter Portal (WCP) integrated with Oracle Webcenter Content (WCC).
Some pages of the website need to show public documents that are stored in WCC. In order to do this I use WCP content presenters. However, I realized that, in order for the document to be visible to a user that is not logged in, that document must have no account associated in WCC.
However, for security reasons, prior to it's release the document needs to have an account.
I was trying to use WCC Workflow events to alter the account using wfUpdateMetaData Idoc function. However, after some research I realized that this function is only capable of altering metadata that was manually created by me.
Is there any way to achieve this?
Thanks in advance.
You have two possible approaches:
It is possible to give access to non-logged in users, by giving access rights to Guest. It's probably not what you want, so I'll leave this option without further description for now.
Second option is to change account by using executeService to call the UPDATE_DOCMETA service. It might an issue that the document is in an active workflow and you might have to call wfRelease prior to the service call (I have no possibility to test it right now)
Not sure if anyone is still using the legacy 1.4 - but I love it!
Background:
I have a user dashboard available at app.com/home/dashboard
To optimize DB hits, I cached the template Since the URL doesn't have a user parameter, a user ended up seeing another user's data
To beat this, I wrote a filter to include the user-id in the URL, giving each user their own URL like app.com/home/18/dashboard
While this prevents the data leak and provides the benefit of caching, it is messing reporting in GA, since I cannot track the total visits to the Dashboard (directly)
Has anyone worked around this?
I've had the same problem. To solve it I've decided to split the whole page into partials and components and cache those instead.
To make partials/component cached per-user just pass 'user_id' => $sf_user->getId() along with parameters. That will make user_id value used as part of cache entry key.
In an Access 2013 Web App, I created a relationship by changing a field type to "lookup" and set a related table/field. Now I want to remove the relationship. Whenever I try to change the field type to anything besides "lookup", it tells me I must delete the relationship in the Relationships menu, which doesn't exist in a Web App.
The MS support pages just link back and forth without ever answering this glaringly simple issue.
MS Support Instructions for relationships in Access 2013 (not web apps)
How to create a relationship in an Access 2013 Web App (not delete it)
Good question. I agree that the message we display is a little misleading because the instructions only apply for Access desktop applications. I'll see if we can perhaps change that message. I think it is shared across desktop and web app but I'll ask around. I'll see if we can maybe update the help content articles too. I can't make promises of course, but I'll check on that too.
In any case, to delete an established relationship in an Access 2013 web app, you'll have to delete the lookup field itself. If you need to keep the existing data for some reason, you could temporarily create a new column in the table, use a data macro to copy all of the contents from the lookup field you want to delete into the temp column, and then delete the lookup field itself. You could then copy that data from the temporary column into a new column if need be.
I hope that helps.
I have a question that i want to add the function to track the click stream of user in my website, How can I achieve this, using ajax tracker or Django-tracker modules?
I have actually wrote a django-clickstream application, I just haven't open sourced it yet, I want to test it out to make sure it works well before releasing it.
Here are the steps you need to do to reproduce what I did, it isn't too hard.
First off you would need to keep track of each visitor for the life of their session or cookie. You can do this using django-visitor or roll your own.
Once you have a visitor you can create a custom middleware that will look at each request and then log what url each visitor visits to a database table. Then all you need to do is create a simple web page where you can view the different click streams by visitor.
One important thing to note is that you will need to setup an exclude filter so that the middleware doesn't pick up any urls that you don't want to track (static, etc), I did this with a simple list of regular expressions that I stored in the settings file. If the url doesn't match one of the regular expressions then log it.
The table will get pretty big real fast if you have a popular website so you will need to create a management command to clean out the old records from your tables.
Django-visitor: https://bitbucket.org/kencochrane/django-visitor
Edit:
Check out Django-clickstream: https://bitbucket.org/kencochrane/django-clickstream
I just finished to implement a custom functionality in one of the page articles in my Joomla website using sorcerer. In this page it is possible to query a hash and lookup it against a database.
I would like to store the last 5 queries and show them in the page but I don't know how to do it. I need something as Java EE "Application Context" to store this values and make them available to all the users so using a Session to store this values is not what I need.
I saw in the documentation that in Joomla exists JApplicacion but none of his methods allows me to store data.
Not having used Java, but I am pretty sure that the whole PHP platform has no "Application context". You simply need to store them in a database table.
JApplication is used to wrap up all the code that runs as the Joomla CMS. Its livetime nevertheless ends with the end of the request.
HTH, Jochen