Background Music in wordpress, with ON and OFF maunual - php

I need to have background Music in my website, With user oN and OFF functionality, I have used a javascript, but the problem is, when the user switch off the music, then on reloading the page, the music starts again, is there any plugin available to accomplish this task.

Soundmanager is your friend.
It is easy to configure install and also has many options.
It works like this example site.
It has a excellent examples when you download it. First try to run the examples and check for the example that might best suite your requirements.
One more important thing to remember is the paths in these JS files. The path names to the files it uses is little weird so look out for the path names if you get errors and you should be good to go. :)

Related

Choosing between open source php photo gallery and-or cms

Im in the beginning of developing three different web applications with the classic php/mysql technologies. These applications would all have photo galleries (with different requirements in sizing).
I think the best choice is to choose an open source solution rather than developing from scratch. However, even though Im an experianced php programmer I have no experiance in open source cms/photo galleries.
So, questions:
what are the best choices for an open source php photo gallery considering that I will surely have mess up with their code and extend it (ive seen plogger and zenphoto, not impressed)?
Is it wise to choose an open source php photo gallery or go with a cms (eg wordpress, joomla, typeo3 etc)?
If anyone has experiance in using and extending php open source apps please share some knowledge.
If your site mainly on photo gallery highlighted, better to choose Photo gallery open source software which are available instead of Joomla like CMS.
www.plogger.org
You can try:
Gallery
Coppermine
Both are well known PHP Photo Gallery open source software (GPL License). Also both are under active development and have a big community of users, so you can probably get help when you will need it.
Also both have some, kind of integration with the most known open source CMS.
I recommend to search a good gallery plugin that suits your requirements from wordpress plugin directory. http://wordpress.org/extend/plugins/
I actually use Gallery, but not in the sense that most people do. I install it in a directory that only the admin will see. I link it up through my CMS with an icon, and tie the authentication system to match my CMS's. It exists only for the admin to get photos in.
From there, I do queries on the front-end with php into Gallery's database to get the photos that I want. It's certainly not rocket science once you figure out which tables and which directories are required to get what you need.
Could I use something canned? Sure. But my clients demand more than that. Because I'm just too busy to get something completely custom finished that includes resizing, javascript cropping, folder traversing, etc in addition to the crazy front end transitions and presentation I already write, this has been a great solution. And it works, every time. I can focus my time on making the front-end really unique and perfect for that particular application.
I've been using Xoogallery, which is a responsive php photo gallery. It's open source
They offer a developer license so you can us it on your client's websites.
Try it http://xooscripts.com/product/html5-php-photo-gallery.html

photo album for website

I want to have a photo album on my website such as this:
http://www.yelp.com/biz_photos/B9S9wNChMFRz6IAL_0n6pA?select=ADeqFE2Tj2s7eM8WuQibbQ
I'm looking for something where the photo that is displayed is also highlighted as thumbnail below that so that users can select photos rather than having to click next.
Also, I want to be able to have multiple photo albums so each set of thumbnails is different. Perhaps something where the whole page doesn't have to reload, but just the photo itself and the highlighted thumbnail?
I've done some research but I'm unsure of which type is best ie- PHP, javascript, etc...
I only have experience in HTML, CSS, and basic javascript and limited PHP.
I'm hoping somebody can point me in the write direction as to what to look for.
Thanks
Learn jQuery.
http://www.jquery.com
Rejoice!
http://blueprintds.com/2009/01/20/top-14-jquery-photo-slideshow-gallery-plugins/ <-- take your pick.
The jquery cycle plugin is fantastic and super easy to set up:
http://jquery.malsup.com/cycle/
and specifically it has the ability to do auto-thumbnailing as navigation:
http://jquery.malsup.com/cycle/pager2.html
If you know CSS you can take it from there.
As I myself am not the best (but still trying to get better!) when it comes to the more UI related technologies (CSS, JS, HTML etc), I have found using popular libraries such as JQuery Tools to be quite helpful and very easy to use. I believe the widget below matches up with what you are looking to do, and it also comes with a tutorial and helpful customization examples:
http://flowplayer.org/tools/demos/scrollable/gallery.html
Best of all I think JQuery Tools and Flowplayer are open source, so that means once you get the widget working, you can also delve into the code to try to gain a better understanding and hopefully one day take your own crack at a similar solution.
Good luck!

Is php capable of doing what I want?

I'm working on a biology web based application and trying to figure out what language to use. The features I need to include are:
Image viewing frame - This area will display the current image that the biologists wish to see. The application needs to take in a number of coordinates from a file and draw those points on the image displayed here. When the biologist wishes to change images there needs to be no flickering from the refresh. Will do this using multiple image buffers probably. Content needs to be scrollable and able to be zoomed in.
There need to be labeled buttons that advance, step back, zoom, and play the images displaying in the image frame. There also needs to be some type of list view where images titles can be selected to be displayed.
There will be a bunch of folders of images on the server that can be selected from. The application must allow the user to select which folder of images to be loaded. It also must be able to read from either an txt or xml file and visually display the information there by way of line graph.
Would like to be able to run scripts on the server from the application.
I feel that all these things are doable by a web application but I have no idea what language to use. Most people recommend php, but i don't want to delve deeper until I know what its limitations are. Any suggestions are welcome. Thanks in advance.
-Mike
PHP can do everything you need for the back end, but most of the stuff that you describe is UI based, and this is dependent on the client, which is, of course, the browser. For highly graphical projects, you can do a lot in JavaScript and some JavaScript libraries have a lot of these capabilities built in. You might also consider Flash or Flex.
You might even consider a desktop application that runs outside of the browser. You can use Java, which is easy to deploy, but still requires the user to have the Java Runtime Engine, or you could go with a language that you can compile down to a native application.
Regardless of the front end technology that you choose, you'll still need a back end, and PHP can handle this.
You will find almost every server side platforms such as php , asp.net, asp, etc will do all of the above.
PHP is a language that resides on the server and handles all requests. Javascript (and associated libraries) is a language which is executed by the client's browser and handles (almost) all interaction. PHP is definitely able to do what you want, but for the interaction stuff (particularly the zoom, scrolling, etc.), you'll also need to use Javascript.
So, short answer, PHP is good, but you're going to need to use client-side scripting as well.
PHP is more than capable of doing this. You are going to need to use it in combination with some Javascript to handle the client side effects you describe. I would look into modifying galerific for your needs and then whip up some javascript to write points over the images.
From your concerns about image refresh/flicker, it really sounds like a desktop app is what you are looking for, for a rapid response on image changes. The requirements on this really seem to need to be defined better before you can choose a language... PHP can do all the server side stuff you mentioned, but you might have a harder time getting the image viewing "frame" to provide the functionality you want.
Due to the image manipulation requirements it might be easier to go with something like flash with a php backend or asp.net with silverlight. It might be difficult to prevent flicker and delays with using pure javascript as opposed to flash/silverlight.
Image viewing frame
This will most likely need to be done on the client side using tools/frameworks such as jQuery, the canvas element, silverlight, or any of the other 100's that are out there.
There need to be labeled buttons that advance, step back, zoom, and play the images displaying in the image frame. There also needs to be some type of list view where images titles can be selected to be displayed.
PHP or any other server-side scripting language could pull this off. If this is meant to be a quick project running on free/cheap hardware then PHP would be a good choice. If the plan is a large application that will have to be maintained over the course of many years and hosting/price is not an issue then I would suggest something like ASP.NET
There will be a bunch of folders of images on the server that can be selected from. The application must allow the user to select which folder of images to be loaded. It also must be able to read from either an txt or xml file and visually display the information there by way of line graph.
Again any server side language could do the folder listing portion. As for reading files and creating graphs, this would most likely be a combination of server side and client side programming. jQuery for example, has plugins that could quite easily take a xml file and create a line graph.
Would like to be able to run scripts on the server from the application.
PHP, ASP.NET - both could do this. I'm sure many others could, but these are the ones i use most often
The issue with PHP is that quite often, the code turns into a mess over time. This is maybe not so much an issue with the language as the people using it and the purpose the app was built for (a quick, one time project). Classic ASP also has the same issues.
ASP.NET is a good combination of OOP programming that allows you to separate presentation from logic with minimal effort.

Restricting access to images on a website

I'm putting together a portfolio website which includes a number of images, some of which I don't want to be viewable by the general public. I imagine that I'll email someone a user name and password, with which they can "log-in" to view my work.
I've seen various solutions to the "hide-an-image" problem on line including the following, which uses php's readfile. I've also seen another that uses .htaccess.
Use php's readfile() or redirect to display a image file?
I'm not crazy about the readfile solution, as it seems slow to load the images, and I'd like to be able to use Cabel Sasser's FancyZoom, which needs unfettered access to the image, (his library wants a link to the full sized image), so that rules out .htaccess.
To recap what I'm trying to do:
1) Provide a site where I give users the ability to authenticate themselves as someone I'd like looking at my images.
2) Restrict random web users from being able see those images.
3) Use FancyZoom to blow up thumbnails.
I don't care what technology this ends up using -- Javascript, PHP, etc. -- whatever's cleanest and easiest.
By the way, I'm a Java Developer, not a web developer, so I'm probably not thinking about the problem correctly.
Instead of providing a link to an image. Provide a link to a cgi script which will automatically provide the proper header and content of the image.
For example:
image.php?sample.jpg
You can then make sure they are already authenticated (e.g. pass a session id) as part of the link.
This would be part of the header, and then your image data can follow.
header('Content-Type: image/jpeg');
Edit: If it has to be fast, you can write this in C/C++ instead of php.
Using .htaccess should be the safest/simplest method, as it's built in functionality of the webserver itself.
I do not know if it fits your needs, but I solved a similar poblem(giving pictures to a restricted group of people) by using TinyWebGallery, which is a small gallery application without database.
You can allow access to different directories via password and you can upload pictures directly into the filesystem, as TinyWebGallery will check for new dirs/pics on the fly. It will generate thumbnails and gives users possibility to rate / comment pictures (You can disable this).
This is not the smallest tool, however I thik it is far easier to setup than using apache directives and it looks better as naked images.
If you're using Nginx, you could use the Secure Link module.

What are best practices for determining if I should create a new Drupal module?

I'm using Drupal for the first time for a project at work. I'm finally getting my head wrapped around some of the core concepts, but when it comes to customizing output I'm unsure of how to proceed.
I have to build a fairly specialized image gallery. I've managed to cobble something workable together using Views2, but it's not quite where it needs to be. I'd like to write it from scratch, using SQL and actual PHP, rather than working through this web UI.
I figure I'll put this functionality in a new module. Is that right? Or is that an abomination to the Drupal world?
Edit:
Here's what I've got so far. I've created Image Gallery and Image content types with CCK. Images can be assigned to multiple galleries, via nodereference. I've got imagecache creating two sizes for each uploaded image - a thumbnail size and a gallery size.
Two gallery formats are required, but let's assume I'm going to have a carousel style for now, with some custom JQuery and CSS to match the rest of the site's look and feel. Clicking a thumb in the carousel-style navigator will load the full sized image above it.
Now, assuming such a thing does not exist, what is the recommended approach for creating it? Not how to code it, but where would this code live within the Drupal system?
It seems like views will do the job of creating the data you need - a list of all the images for the galleries, based on whatever criteria you need (taxonomy,author or whatever) and that the carousel part - adding the jquery and css could be done by using drupal's themeing system to change the output.
So as ar as 'where would the code live' I would say in your theme, rather than a module.
The views theming system is pretty comprehensive, if possibly a little overwhelming at first.
This looks like a good starting reference: http://www.group42.ca/theming_views_2_the_basics
You can do this. Views is great but will often only get you 90% of what you need out of the box.
You can do views theming, which can take you further, and you can write extentions to the views functionality (but that is not always easy).
There is nothing wrong with writing your own module in stead of views, in some cases it can increase performance. One tip if you are doing this is that you can see use the query that views creates in your custom module, this can save you having to work it out and write it yourself.
Yep, I'd put this in a module. I often wind up writing custom ones for specialised use cases.
Well since it is free software you are free to do (almost) whatever you want with it.
A good practice to decide if you should do it is:
Will the benefits that I will get from
a custom module divided by the time
I'm going to invest in it. Outweigh
the benefits / over time of a solution
that isn't ideal?
Or if you prefer to look it this way:
Custom Development Benefits Not 'ideal' solution benefits
--------------------------- > -----------------------------------
Development Time Time to install and adapt
Since normally the Time to install and adapt normally is smaller than the time to develop something from scratch, the common conclusion is to just use what is already there.
But by all means if you want to develop your own thing and have enough time, go ahead.

Categories