I have a song lyrics data structure that I'm developing and I've hit a dead end. To understand the basics of the structure, check out Justin Tadlock's article: create a movie database using custom taxonomies
This has been the closest thing to what I need. But the requirement that breaks everything is that the user needs to sort the lyrics based on the parent album's release date. Wordpress allows for a custom taxonomy to have meta data, so I have created a custom taxonomy: "album" with a [release_date] field.
Now, I'm stuck because I can't figure out how to write a WP_Query that will give me the following data:
Album Title - Released 2012
Song Title - Track 1
Song Title - Track 2
Album Title - Released 2011
Song Title - Track 1
Song Title - Track 2
All my research has led me to dead ends so I would appreciate anyone's help. With this current dead end, I may have to resort to hand coding custom tables and doing raw SQL queries.
I'm fairly certain you can't do this directly, as I had this issue before and did quite a bit of research. What I ended up have the wp_query loop create an array of posts, which I could then sort with any of the regular php array sorting functions.
Related
So I am working on a project that awards points to students for submitting assignments or participating in forums, these points are then exposed as an Http resource using Flask.
The points are calculated by looking at the events triggered for each student.
One of the requirements right now is to add a box next to the student's name that shows the total amount of points they have. I have two ways of accessing the points, either by an http request from moodle or by storing and retrieving the points from moodle's database.
My question is what is the best approach of creating this "box", I have tried using moodle blocks and hacking the code but nothing seems to be working. Is creating a plugin for this the only solution or is there a simpler way to do it (if it is even possible)?
To answer your question properly you should have provided at least the theme and the Moodle version you work with. Should this box be displayed everywhere? Is the score calculated for every course individually?
Two proposals that came into my mind:
You could create a custom plugin of type block. There you can display the score of the user of the session and the top ten for example (If the score is calculated for each course individually). A disadvantage is that every teacher of a course could remove that block easily, if he or she wants to.
If the score counts system-wide you could put that box at the start page of your Moodle website, where only people with higher rights will be able to remove it.
If you use boost you could display the score in the navbar right next to the users name. For that you will have to create a new child theme of boost and overwrite navbar.mustache of theme_boost which get's it's information from columns2.php because it's included into columns2.mustache. In this PHP file you can include your logic and display it with the HTML which you put into navbar.mustache.
Of course these are not really simple ways to do that. But at the moment I doubt that an easy solution exists for this problem.
I have a website that's been running for over a year. The overview is getting lost in the Articles doctype and I've been asked to change the file structure from Articles/Article to Articles/Year/Month/Article.
In short, the admin opens Umbraco and sees the Articles and clicks the arrow to see all the articles. It then takes a couple of minutes since the are all loaded. Instead I want a map structure that devides the articles into year and month published.
Since i'm talking about 5k articles, I can't really do this manually.
Any advice?
You could do 2 things:
Create a simple script which moves all articles into a year/month folder structure. Should be pretty simple to make.
Add a List View content type on your "Articles" template. It will give a searchable list with all 5K articles. It will prevent the loadtime in Umbraco UI. You can see how the list view works here: http://www.robertgray.net.au/posts/a-first-look-at-umbraco-container-content-types
You need to look at the UrlProvider and ContentFinder configuration in your umbraco instance.
Shouldn't require any manual editing of the articles provided they were posted on the days you would like them to display as.
Take a look at this: https://24days.in/umbraco-cms/2014/urlprovider-and-contentfinder/
I will be building a site for music reviews. Say, i review a album of "Summer Hits 2011". It would contain about 10-15 artists. Now, i have portfolios of all these 10-15 artists. In the review, the artist names should be a hyperlink. Is there any way to automatically make the artist names as hyperlinks, instead of manually making it a hyperlink by linking to the artist's page. I know the question is little bit vague, but i tried my best in putting it the right way.
I though of using asp.net. What do you guys suggest ? I have heard of CMS solutions like Drupal. If you can point me in the right direction it would be great.
A silly question - Where and how the information is stored. Pick a movie page in IMDB. Do they create a html page for this movie and keep it on the server. Or do they just query from DB and present it in template ?
Thanks,
Dev.
I am new to IOS and coreData Framework..from past 2 days m reading tutors regarding coredata..I understood few concepts..but i am confused..can you all please suggest me good tutorials regarding coredata.
So my second problem..I am building a application..where my first view has a text field and a search button..and an empty table..so when the user enters a search query and hit the search button..it opens a another view which gives him a list of values in a table and again when the user cliks on a specific cell he is agian taken to page which contains some values..so on this page ,I want to have a button name (xyz) which when cliked..will save that particular value in the table which is present in the first view..and similarly the process will conitnue..
So i want to know..whether coredata is necessary for my problem or any diffrent menthods are available......
Please reply..m waiting for your respones..
Regards
RRK
Core Data manage very well sqlite database.
You can learn on the apple developer website :
http://developer.apple.com/library/ios/#documentation/DataManagement/Devpedia-CoreData/coreDataOverview.html
And there is a quite good tutorial here :
http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html
I think core data is a very suitable solution for your problem.
I am trying to write an app that searches a website, and takes all of the results and puts them into a customized table. I am an Objective-C and iPhone SDK noob, and am hoping that this logic is what I am trying to accomplish:
1) Searching multiple search engines and pulling all of the data off of each website, storing each into a different array (for example: Searching Google, Yahoo, and Bing for "Shoes", and taking all of the different search results, hyperlinks and all, and storing them into three different arrays)
2) Pulling the data out of each array, and putting into a table (Table view in Interface Builder)
I've also written some pseudo-code that I am hoping that you all can look over to see potential design flaws, and logic errors. I figure if we can get logic and design errors out of the way, throwing some syntax together could be relatively easy?
Class SearchWebsites:
NSString *websiteURL = "http://www.searchengine.com/keywords=";
UISearchBar SearchButtonClicked{
NSString *websiteURL = websiteURL+searchBarText.text;
Go to websiteURL;
Extract all hyperlink data from websiteURL and store into NSArray *websiteData;
Load SearchResults.xib;
}
End Class SearchWebsites
Class SearchResults:
Table data = NSArray *websiteData;
End Class SearchResults
I am assuming that I need to declare global variables, so that they can be called from different classes......right? What's the syntax for doing this? How do I set this up in IB? Did I bite off more than I can chew for this first app?
Thanks for your help!
i think this is really big question to be answered here :) ... First of all it might be useful for you to read the documentation from Apple about Objective-C http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html .
Then you might search for UITableView programming guide on the developer website, but there is a nice tutorial here: http://icodeblog.com/2008/08/08/iphone-programming-tutorial-populating-uitableview-with-an-nsarray/
Moszi
You might want to use NSMutableDictionary to build a list of links - you can iterate it like an array if need be, but can also look up entries by name.
iPhone SDK Development will teach you the basics you are after.