I'm looking for a way to create a custom user style sheet, based off of user inputs, using user inputs. Basically, users select different options, such as background colors etc., and then the app will create a style sheet based off their inputs. Their inputs are done through HTML inputs tied to some jQuery functions. The style sheets will be saved in a user database, that they can potentially view/download.
What's the best way to approach this?
There are two ways to achieve this:
Save css in database
Create actually file and while viewing parse it to display style classes.
Go through step below:
Step one: Answer your question in yes or no
Is your application is for web designers?
Is your application has one feature of theme?
Is there is frequent changes in css styling?
Is this feature for end user?
Step two: Find out your answer with keeping user in mind.
Step three: Take decision
If question 1 and 3 is yes then save it is in database and when web designer publish changes make style sheet, and fetch from DB for viewing.
If question 2 and 4 is yes then make style sheet, use that when you going to apply that sheet and parse for viewing.
Related
I am developing a "Google Sheets" alike web app, and there has to be an ability for 2-50 people to edit the same table at the same time. So to avoid conflict when 2 people edit the same cell of the table, when person clicks on the cell, that cell has to become disabled(uneditable) to other people.
Question:
How can I track what cell is disabled?
1) Do I have to make mysql table that will be changing online dynamically(to store cell id which is being edited ) (I think this is super stupud idea)
2) Somehow make a variable that would be available for all the users at the same time(but I dont know how to do it)
make a table with all the cells, and a field active with bloean. Then when some one clicks in a sell, you can set it to 0 by ajax. If its 0 you put a disable in the input.
I dont know how you doing this app, but i think you can do something like i said. Use ajax to send the info to the table in your DB.
The only way to persist some data across several users is to have some storage on back end. There are a lot of options (not only MySQL): you can use mongo, firebase or even store this information in text file (not recommended), but you need to store it somehow to let others know about situation with your table.
Would it be possible to use a popup form to handle parameters for a custom menu item in a spreadsheet? I'm not necessarily asking for someone to write the script. I just don't want to try only to discover I've been wasting my time.
In my spreadsheet, I want to be able to save a sheet to a new file/spreadsheet (that part is done) and then access/load that saved sheet again later through a custom menu command. The issue I'm running into is that I want to be able to call the same function every time, but be able to specify a parameter (which sheet to access). My thought is that the form would act like an alert with multiple choices populated by the array of available sheets.
Or is there a simpler way to offer a multiple choice without going through a series of YES/NO alerts?
Yes. You can use dialogs.
modeless dialogs
modal dialogs
Dialog Example
I'm building a website using the ACF plugin (Version 5 Pro), and I'm setting up a button on a page template, which by itself isn't the problem. The problem is that depending on the specific content of each individual page using that template, the button can have one of several different appearances. What I'm trying to do is set things up so that I can upload all the buttons into the default value section of the ACF field ahead of time, and then every time I make a new page using that template, simply select the appropriate button from a radio button, a dropdown menu, or something similar on the backend of the page. I plan to be constantly uploading small amounts of content using this template, so not having to manually select the appropriate images on each page would save me a lot of time.
I've googled around and there wasn't a good answer I could find anywhere, so I'm hoping one of you more knowledgeable folks could help me out!
(And before anyone proposes this as a solution, no, the content of each page isn't something I can define just using programming. It's a little more abstract and needs human input. If all else fails I can just make multiple templates and simply select the appropriate one when I go to make a page, but the way I'm trying to do it now would be a lot cleaner).
You can try ACF Flexible Content:
https://www.advancedcustomfields.com/add-ons/flexible-content-field/
Using Flexible Content field, you will be able to create multiple fields (button 1, button 2, etc) including a WYSIWYG editor and build the buttons HTML adding the default value of the field.
You can read:
https://support.advancedcustomfields.com/forums/topic/html-default-values/
However, I think you'll get in trouble making your buttons dynamic with this approach... so I'd suggest it will be better if you keep some parts of the buttons (like URLs) dynamic, using an extra field to enter the URL, anchor, etc.
Let's say I made around 5 surveys on surveymonkey, and I am using a developer surveymonkey account to try and manipulate these surveys.
My end goal is to dynamically give them a survey based on what actions they took on a page. Let's just say for a brief example there are 5 buttons they can press, and on each, a new, different survey would appear in a sidebar or something along those lines
I can use their API to return details of the surveys in my account, but I can't seem to find a way to add a new collector or dynamically embed one of my surveys.
Is there a way to go about this?
I set up a web service using LAMP for personal use.
Basically, I have a scrollable list with some database information I pull once in the PHP script. I'd like to be able to click on one of the items, and have more information appear in a preview pane . (preview pane is set up)
I don't expect to ever have more than 100 entries in my database. Also, the data I'm pulling is very small...about 10 fields, all text data.
My question is as follows:
If I pull all the data I need in one shot, how can I store it so that each block of data I define (2-3 rows are what I need in the preview pane) is "cached" and I can access that given block at will so I can display it upon clicking its corresponding list entry?
Basically, this is about the same as clicking an email in a web-browser and having the rest of the message show up in a preview pane.
Thanks.
nb: the fact that I'm using a preview pane or a list is irrelevant. Just describing what I'm doing.
If I understand correctly, you would like to create a simple page, where several details are hidden until you click on different buttons. If you would like to do this in a "cached" way, you can try the following:
Fetch the complete data so that everything (with details) ends up in the result HTML. Everything: I mean, the parts which should be visible at all times and also the details which should be visible only after pressing a button.
Now, to the design. You will have to write CSS code, which will hide the details. (Of course, for that, you will have to create HTML in step 1 which will let you target the details via CSS classes, for example.) You will also have to figure out how to create buttons.
The most complicated part is to bind the buttons to Javascript actions, which will perform showing the hidden details. You can control all CSS properties from Javascript, so for example you can alter the position, the size, the text color etc. of a <div> dynamically.
Most people nowadays use jQuery for tasks like the one in step 3, or even software libraries built on the top of jQuery. That could help a lot if you're just starting out with tasks like this one. On the jQuery site, you will find a great place to start, called the jQuery Learning Center.
Edit: I've created a very basic fiddle to let you test the JS part of my concept, see it here: http://jsfiddle.net/eL9mj/22/