I'm using meteor to make a web page. A large part of the web page is Galleries of images. Is there an easy way to keep information about the images and either the images themselves or links to the images in a mongoDB such that a gallery can be created on the fly to suit details entered by the site user?
I'm not sure about StackOverflow's policies on this question, but I'll tell you what you can do.
First you'll need a way to upload images. There's a package called lepozepo which will perform that for you.
After you have that, you'll take the urls that lepozeop generates for you and save this to a collection. There are a number of ways you can do this, if you know javascript you know at least two ways to accomplish this.
Once your collection is saving the urls for you, you just have a template that returns to you the image entries from the collection by using a meteor helper. It would look something like:
Template.gallery.helpers({
images: function(){
return imageCollection.find();
}
});
And in your template
{{#each images}}
<img src="{{url}}>
{{/each}}
Related
I'm developing a website for a magazine using Ghost (http://ghost.org/) and would like to have pages that display posts from two related tags. Eg. "Science and Environment". I understand that when using a static page you do not have access to posts so I cannot for example do this. This would however be the ideal solution.
{{#foreach posts}}
{{#has tag="science, environment"}}
do thing
{{\has}}
{{/foreach}}
I have had a look on the Trello roadmap (https://trello.com/b/EceUgtCL/ghost-roadmap) but couldn't spot anything there. I would appreciate any help on a workaround.
Cheers
This is possible but a bit tricky
You should install self-hosted Ghost . There is a lot of step-by-step manuals how to do this on Amazon, DigitalOcean, Heroku, etc.
You should create your own custom Handlebars helper for your purposes.
Create myhelpers.js in the Ghost project root and put your own helper code here. For example: {{bytag}} helper which selects posts by one tag. You can extend this to query posts by more than one tag.
At the beginning of config.js place require('./myhelpers')();
to activate your custom helper.
Restart Ghost
Hi i'm creating a webpage for my school's newspaper/journalism club. to be honest i don't know if any of the club members have much html programming ability and when i finally publish this page, i don't want to have to teach them how to update the page themselves (i will still help i just don't want to have to update the homepage my self) so basically my question is: is there a simple way to create an html form(s) that can create an html webpage? and could it be made so it updates to multiple pages at once. Thanks!
oh also if it is not possible with html or html5 i'd appreciate it if you post which programming language it needs to be done in :)
basically what i want is a form for the title, one for the paragraph, maybe a couple for pictures and i want it to turn out in the same format every time.....
I guess you'd have to look at a CMS (content management system) like Drupal, Joomla, WordPress, ... (there are many many more out there)
These CMS let you create and update your pages in just a few clicks even without basic HTML knowledge!
I would like to know how I can add pictures/image functionality to the confluence survey macro. I would like the user to select a picture from a list of pictures in response to a question. First I need to find out a way the wiki owner can upload pictures for the users to select one. Secondly allowing the user to select one picture. I am a beginner trying to learn confluence/wiki technology. It would be great if someone could help in this regard.
I don't have any experience with the survey macro. On the once occasion when I needed to have a survey-esque function on confluence I just used html and js.
On the subject of attaching images I do have experience though. If you go up to the Edit drop down you'll see a link to Attachments. There you can upload images which will be attached to that page.
You might want to look into whether the survey macro has the ability to work in conjunction with the image gallery macro.
Use pictures instead of words in the survey macro option list.
{survey:title=MyTitle|choices=!apple.png!,!orange.png!,!banana.png!|changeableVotes=true|showSummary=true|showTopSummary=true|showLast=true|visibleVoters=true}This is a survey{survey}
You can also have words and pictures.
{survey:title=MyTitle|choices=!apple.png! I like apples,!orange.png! I like oranges,!banana.png! I like bananas|changeableVotes=true|showSummary=true|showTopSummary=true|showLast=true|visibleVoters=true}This is a survey{survey}
What would be the easiest way to set up a way in which my iPhone app can read news data online from my website, for example. I want to be able to push news or updates to the bottom of the app such as "Check out our new app, blah blah" or something along those lines. I thought of one way, but I didn't know if there's better ways.
Keep some html file on my server (my website), and have the iPhone read that html data
Any other ideas? Anyone have experience in this field?
If you already have a blog or are familiar with some popular blogging software, you can likely take advantage of RSS feeds that are automatically generated for you.
For example, you can have Wordpress automatically generate RSS for a post type, a tag, a category, or pretty much anything else that returns a set of posts. Your application could then consume that data without you needing to manually update anything code-laden, just add to the blog and it's available in the feed.
I'm developing a form using the Zend Framework and utilising dojo. One part of the form is gathering a users contact details and address. The issue I am hitting is using the FilteringSelect or ComboBox dojo component to select the city/town. I have in my database a list of 40K+ town/city names.
I've tried to use the Dojo component to grab this list but fear that 40K town names is just too big. I don't want to manually use a standard html component as I am sure that all that extra text in the page would make my form a nightmare to load.
So I suppose my question is in 2 parts:
What's the maximum JSON data size I can realistically expect to use, as I expect that what I am using is too big.
What would be the best way of allowing users to select one of these town names in the form?
Thanks in advance.
Youch, that's a big list of data points. I'd say it's really dependent on the user's browsers and settings. And tolerance for waiting.
If you are able, I'd say to put the data behind a web service and use the the dojox.data.QueryReadStore. That page even has an example of using a service to query states using a ComboBox.
<script>
dojo.require("dojox.data.QueryReadStore");
dojo.require("dijit.form.ComboBox");
</script>
....
<b>Combo lookup of states through QueryReadStore</b><br>
<div dojoType="dojox.data.QueryReadStore" url="/moin_static163/js/dojo/trunk/release/dojo/dojox/data/tests/stores/QueryReadStore.php" jsId="comboStore"></div>
<div dojoType="dijit.form.ComboBox" store="comboStore" searchAttr="name" pageSize="100"></div>
QueryReadStore.php is available in svn so you could even look at what they did server side.