How to manage large amount content on one page in a clean user searchable way, filters - database

I've presented them all as a list in 3 columns (see here: http://focallocal.org/action/ ) but i need to double the amount there now and it is going to look terrible.
what we really need is filters to cross reference and organize them as the number will grow to over 100 soon. Any suggestions for managing and organizing the large amount of content?
It doesn't have to be on one page as long as i can put a short intro and photo to each page

I suggest making a separate post for each of your project descriptions with a custom post type called "project" or similar to group them all (and so it doesn't affect any ordinary blog posts.)
How to add a custom post type
Next, you need to "flush" the permalinks (Settings > Permalinks, click Save Changes.)
The Project posts can be split into categories or you can add tags (less formal) and each post can have a featured image.
If you called your post type "project", you will be able to view an index of all of them at http://example.com/project, which, taking the TwentyFourteen theme as an example, will use the archive.php file as a template (see the Template Hierarchy.)

Related

How can I make a photograph database that displays the results of a query as some kind of image gallery?

I am taking a database design class and for a project want to make a database of my mom's digital photos for her. I haven't dealt in application up to this point, only theory, but I have Access. Therefore, ideal answers don't suggest non-database solutions and don't assume I know much about actual database implementation. Solutions specific to Access could also be a plus. I hope that precursor saves some time and effort.
Theoretically, my mom wants to see all photos of pets from '05-'07 in raw format, and she enters an appropriate query. I suspect I can handle it up to there. However, at the moment, the best I can figure out to do is to return a column of either attachments or OLE objects. 5 clicks per photo is not ideal. I need a faster way to present the images. Opening them all in a grid of thumbnails or as a one-click-slide-show would seem the natural fit, but whatever works. How can I accomplish this?
Less important but worth consideration is the fact that, at some point, it would be great if this same type of system could be implemented on the internet for all of the family reunion photos she has taken, but I will take what I can get.
Use one form to get parameters for the query. then use another form(more processing) or report(if printing) to show the selected pictures. I will not cover passing parameters but here are some links.
https://www.fmsinc.com/microsoftaccess/forms/openargs/index.htm
https://learn.microsoft.com/en-us/office/vba/access/concepts/forms-design/apply-a-filter-when-opening-a-form-or-report
There is a complication, in Access pictures are usually stored in the attachment type. the attachment column can hold many pictures in each record. So if we have a table called Pictures with an attachment type column also called Pictures, then each individual picture is actually stored under Pictures.Pictures.FileData.
So to display the picture query we use a form/report with default view set to Continuous Forms (displays many records or in this case pictures on the same page) then in the details section of our Display form we place an attachment control and bind that control to our filtered Pictures.FileData.
Format and add functionality to taste.

Arbitrary In-Page Content Snippets

I'd like to include such things as a call-to-action 'offers' (a title, a paragraph and button link), in most of my pages. Since there are potentially multiple offers at a time, I was thinking of defining an 'offer' content type, as I also want an /offers page, however, I don't need nor want the individual node page views.
Given this model, is there a way I can select individual offer content and render it on arbitrary pages in my page templates?
Thanks for your help
So it seems that I can achieve this with a combination of configuring build options to prevent the creation of the physical pages, and using GetPage in combination with a partial, in order to obtain the content itself.

Manipulating Soundcloud Stream with Chrome Extension Content Script

I am writing a Chrome extension using AngularJS to add functionality to the Soundcloud stream page. I want to allow the user to create groups of artists so that they may only see a stream with tracks/shares/playlists from that group of artists.
For example, I follow 500 artists, but I want to quickly see a stream from my favorite 10 artists or from the artists I follow that are on the same label.
I am looking for advice on how I could go about making this as seamless as possible. As of right now, my approach involves getting the tracks with the Soundcloud API and using angular's ng-repeat to display the tracks in a view injected into where the stream normally goes. I realized using the Soundcloud widget was too slow and can't be customized to resemble the native stream items, so I copy/pasted the HTML that an actual stream item uses, but obviously the waveform/comment canvas and button functionality don't work.
What are my options as far as how I can approach this? Am I going to need to write my own players that look like the native Soundcloud ones? Any suggestions would be greatly appreciated.
You should use the SoundCloud API which is very well documented.
If you have already the id's of the tracks / artist, you just have to request the url
GET
http://api.soundcloud.com/tracks/ID_OF_TRACK.json?client_id=YOUR_CLIENT_ID
to get all the informations you need about this track, like the waveform_url, and for the comments you was talking about :
GET
http://api.soundcloud.com/tracks/ID_OF_TRACK/comments.json?client_id=YOUR_CLIENT_ID
To reproduce the behaviour of the comments :
POST http://api.soundcloud.com/tracks/ID_OF_TRACK/comments.json?client_id=YOUR_CLIENT_ID
(with a body param which represents the text and a timestamp in ms since the beginnin of the song, note that you must be connected)
If you don't have the id of the track, you could also use the resolve which give you all the info about a ressource if you have only the URL :
GET
http://api.soundcloud.com/resolve.json?url=https://soundcloud.com/poldoore/pete-rock-c-l-smooth-they&client_id=YOUR_CLIENT_ID

CMS database design, modules?

Im working on simple PHP CMS system and Im stuck with database design.
This is the problem.
I have table named pages, it holds all pages I can add and information about this page like page_url, page_order etc..
Now... Every page can be either webpage that can hold some html content. But it can also be a Blog or anything else. There can be only one blog page. And Blog on the other hand can have blog posts and blog categories.
Simply put, I have pages table that represents all pages I can create.
And every page can be different, it can be webpage, blog module, guestbook, contacts page.
And every page will have different purpose.
So the problem is how to design this?
Now this may not be clear at this moment, but here is my current design so maybe it will be easier to grasp what Im trying to achive:
pages
page_id
page_name
page_url
...
webpages
webpage_id
page_id
webpage_content
webpage_date_created
...
blogs
blog_id
page_id
...
blog_posts
blog_post_id
blog_post_title
blog_post_content
...
blog_categories
blog_category_id
blog_category_name
blog_category_url
...
So, I have pages table that holds all pages, but those pages can be either webpage(simple "static" webpage) or it can be blog, and blog can have posts, categories etc...
So now, if I come to the page which id belongs to webpages template, I joust fetch content and stuff i need and hand it back to controller and the view.
And if I come to the page which id belongs to blog, then I fetch latest posts and show that to the user.
And latter I would like to extend pages so page can be guestbook or anything else.
Basicly, I need database design where pages would be stored in pages table, and each page can be seperate module that would be presented on different way.
Is this the way to go like I described above? Or could it be done better?
Am I doing something wrong here?
There doesn't seem to be anything fundamentally wrong here - you're using object-oriented conventions, which I can't encourage enough. If I understand, all of your pages will be listed in the PAGES table, and then will be connected by PAGE_ID to their appropriate category?
This allows you to continue to add different page types if you so choose, as well as keep a single list of all of the pages present on your site.
The only thing I would add, is perhaps a 'type' column in your pages table. Even though you'd be able to determine this by running a page_id query on the other (blog and webpage) tables, it might make your life easier in the long-run if you're interested in really scaling and being able to gather a quick since of your application makeup (25% static pages, etc, etc).
This layout also would allow you to combine types (if a page_id was present in the blog and webpage tables) you could introduce some static content while also dropping in your dynamic blog features.
Looks good to me:)
Use a "type" column to specify what type of content the page contains. Then use a join table to associate your content with your page. Like:
pages
->id [123]
->type ['blog']
blogs
->id [123]
->title ['My Blog']
pages_blogs
->id [123]
->page_id [123]
->blog_id [123]

Salesforce.com visualforce between 2 objects

In salesforce I need to create a visualforce page that includes the fields of 2 objects. The first object is the QUOTE object. The second objects is a custom object with several fields.
I want to create a visualforce page that shows the records of both QUOTE and the new object. Can I do this without creating a custom controller? If no any hints on the code for this new controller?
Can I do calculations between fields in a visualforce page?
Ideally I want this page to appear as soon as the QUOTE is set to ACCEPTED
1: You can't do this without a custom controller unfortunately, unless one object is related to the other and you're just happy displaying it as a related list on the parent object's page. For calculations you could use rollup summaries for some basic sums etc..
As for a custom controller, have a look at field sets for a super easy way to get fields into a VF page, you essentially configure groups of fields on your objects and then you can stick those groups onto a page with minimal markup.
2: For fields with complex calculations you'll want to do the sums in the controller and then expose the results through variables onto the page in the usual manner.
3: Not really possible without creating a custom edit page in the first place — you'd be better off having a button on the quote page to open up the Visualforce page, that page can simply display an error if the quote is not yet accepted. There are some other alternatives that might work though, like using a forumla field to generate a link to the page when the status is as you desire.
I'm happy to elaborate on any of this, but the fact that you're asking about number 2 would suggest to me that you don't have much experience developing on the platform (not a dig, just an observation), so unless you're comfortable coding in other environments you could find this quite tricky. That said, you're on stackoverflow so I'm thinking you probably know a little about coding at least!

Resources