We are in the process of evaluating Drupal as a possibility to switch from Joomla.
I have three remaining issues I cannot get resolved on my own. I tried posting about one of them in the "Post Installation" forum and got little help. So, I am going to give it a go in this forum and see if some of you have solved these issues.
1) I need to have an image randomly change, in a block, each time the user clicks a link or reloads the page. I have gotten bits and pieces to this issue, and not much of any of it makes any sense. Does anyone know a good resource I can read that explains it in step-by-step detail? I am stumped.
2) I need to embed Youtube videos on the fron page of the site. While I think I have loaded all the modules to do this, the help page in the "media: Youtube" module references a lot of things I have never heard of nor seen in Drupal. Again, stumped.
3) We have a few custom PHP scripts I need to run from links and their own block as well. I have no idea where to start with this.
I have a finite amount of time to evaluate the potential of moving the site from Joomla. Any help would be very much appreciated. I feel confident I am not asking for anything many, many of you have successfully done. I am not opposed to reading whatever I need to read, but so far, I have not been able to find anything that really helps demystify the Drupal implementation.
Comments
=-=
1) I'd use the views.module. Step by step here is difficult without knowing how you are dealing with images in drupal.
2) You don't need the full features media module for this. You can simply use https://drupal.org/project/youtube and then use views to generate blocks and add the blocks to your front page
3) what do you mean custom php scripts? if they are intended to interact with drupal you need to write modules. see the examples.module for examples on how to write a custom block.module
1) I am trying to use the
1) I am trying to use the "Views" module. I tried 52 variations of the options and have not been able to get one image to show up. I have not found an option that would take a path to where the images are stored on the server. I am pretty sure that has to happen unless Drupal emulates osmosis and absorbs images from the ether. Not sure how to tell you "how we are dealing with images". The images are located in a folder on the server.
2) The trouble I have with "Views" is none of it makes any sense. For example, when I go to Stuctures->Views, then hit the "Add new view", I am lost after that. I cannot relate what I see on the page to what I need to set in order to accomplish any give task. I have had zero success using this for anything, so far.
3) We have scripts which access information stored in a MySQL database which allows comparisons to be made between various objects. The comparison is displayed via a dynamically generated chart (PNG image). Here is a link to the current page: http://www.hitechcreations.com/gameinfo/plane-performance
=-=
1)
That would be correct. Views won't do that and expects the paths to the image to be in the database as fields. you may want to look at the filefield sources module to have drupal interact with images in a folder. If you are bypassing Drupal for image handling, then you will need to write your own php and randomizing code in a block module.
2) I suggest using google and use keywords 'node one views' - the video tutorials you find there are (IMO) the best ones out there.
3) to the best of my knowledge if what you are interacting with is in Drupal then you will be writing a module.
* note, i don't suggest the phpfilter as it can pose security issues and is being removed from Drupal 8. If you've code you want drupal to run. Generate a module.
I am not trying to by-pass
I am not trying to by-pass Drupal for anything. I just do not have a clue how to get things done in Drupal. I am very well versed in C, PHP, MySQL, and Apache. I want to take the shortest path to get this done. Time is not on my side. What is on our WEB now, is what I want to be presented by Drupal, nothing more.
I just cannot figure out how to get, what I think is something quite simple, to work within the framework of Drupal.
I do not understand the phrase, "interacting with Drupal" as it pertains to spewing a chart out from a collection of database elements which do not reside within Drupal's database.
Unfortunately, we cannot view anything at vimeo due to security. Apparently, a few systems caught some viruses there once and that site is permanently blocked. Time not being on my side is causing high levels of stress for me.
I do appreciate the help. Just not certain if this is going to work out, in the time frame I have been tasked with.
Well, I just got told to drop
Well, I just got told to drop Drupal. I went to the boss to see what we could do about opening up so I could see that 27 part video series on "Views" and he told me to find another solution.
His concerns are, if it is that complicated to put up a random image, then we are looking at the wrong solution.
If I could have gotten the site up and running, it would have given me time to learn the intricacies of Drupal, but after 5 days and the front page not being done, it is time to make the call.
Again, thank you for the help. It was appreciated. I wish it would have worked out.
=-=
You didn't need to watch all 27 parts to generate a random image block with views. views is a query writer which saves one from having to manually write their own queries in custom modules. As such, it's an extensive tool which is why there are 27 parts to the node one video collection.
I had no idea which parts to
I had no idea which parts to watch. All I could tell him was there were 27 parts to the series and I had no idea how much longer it was going to take to accomplish the task.
My back was against the wall. He already knew I could write a PHP program to accomplish the task in about 15 minutes, because I have done that. I was already 5 days (12 hours a day) into trying to get this to work and it became a matter of cost versus functionality.
I badly underestimated how much effort it was going to take to move to Drupal. I wish I could have gotten this figured out in a timely manner. I really like many of the features of Drupal over Joomla. I dread going back there as I am going to have to migrate the site by hand.
He is not being unreasonable. I had to do this once before and it took me a week to get the entire site moved, by hand (major site update). I am nearly into the same time period and have not gotten a working front page yet. I have been stagnate on this one problem for too long. I did not realize how complex it was going to be.
I do appreciate your effort to help. I wish I had the time to get a good grasp on how to get things done in Drupal. I think it is still a better choice.
=-=
if you don't want to use views, you can use your own PHP as has been stated at least twice in this thread.
If you want a custom front page and your boss decides to ignore best practices under the premise of time savings, you can generate a page--front.tpl.php file in your theme and do whatever you want with whatever PHP you want and be done in 15 minutes.
Note that time savings earned up front when ignoring best practices are spent later when something breaks, another developer takes over, or the code used is insecure now or in the future.
VM, please do not take my
VM, please do not take my tone as being confrontational. It is not intended. I do not ever wish to work around a given implementation. Had that been my thought process, I would not have bothered to ask how to accomplish something, using the tools available.
This is not my first rodeo. I am frustrated and there is no doubt it came through my posts. It was not personal and not meant to put Drupal in a bad light. For this type of system I prefer Drupal to Joomla, or Wordpress. I think it is a better solution. It was my recommendation to go to Drupal and drop Joomla.
I am just under some very severe time constraints. Our broken WEB site is costing us money, everyday. I just want to get our site up and working, then I can worry about the elegance and understanding of it all.
I still intend on getting to Drupal, but at this time, my time constraints make it almost impossible due to the perceived complications of Drupal. My inability to make a proper schedule is the real issue. I cannot say, with any confidence, I can have something done in X period of time.
I would not be spending my time answering and posting here if I did not truly think Drupal is a better solution.
=-=
The statement quoted above is where I believe most if not all of your frustration and issues come from. One must have some understanding of what tool they are using to effectively use the tool.
I agree 100%.
I agree 100%.
=-=
For others who actually have the desire to explore and learn or with a "boss" who has some where-with-all:
if drupal knows about your images (ie: they've been uploaded in a filefield or sourced by filefield)
generate a new view
generate a block display in the view
set your image field in the block display
add a sort for Global: Random
set the pager for 1 item
save the view
enable the block
done.
That is the first time I have
That is the first time I have heard anything at all about "filefield". What is that? Where is that?
=-=
I mentioned filefields in my second common on this thread in reference to the filefield sources module which (based on my reading) can utilize images in fields from a folder which is what you stated you wanted to do.
if you are adding an image to a content type to handle images see below.
see: https://drupal.org/node/774742
add field: image - it's a core filefield that handles image files.
I am sorry, I do remember
I am sorry, I do remember that and did look at that. I could not figure out what that was for and how to use it.
=-=
if you meant filefield_sources module it has a feature in which it will "Attach server-side files uploaded via FTP". I mentioned it because you stated "I have not found an option that would take a path to where the images are stored on the server" & "Not sure how to tell you "how we are dealing with images". The images are located in a folder on the server." *note - you mentioned these things in relation to views.module. the filefield_sources module isn't for views. It is for aiding in getting the images to be managed by Drupal via a content type and the fields api which would then open the features that the views.module provides.
In short, Drupal must be aware of the images for any part of drupal to use the images unless you are hardcoding the links to the images (which isn't necessary). Drupal is designed to manage content. images can be content. Work with it and not against it.
if you meant the link: it's core documentation for adding fields to a new content type form. With those fields content is added to Drupal.
As an example; To generate a blog content type or news content type one would create a new content type and title it blog or news.
If one wanted to add images to be displayed when the content type is viewed one would add an imagefield
Those fields are presented to a user when a new blog post is added to the site.
The user utilizes those fields to add the data
that data is saved to the database via the content type form
that data can then be extracted and displayed using core features or the views.module or any of the contrb modules that alter default features in core.
In your use case you are dealing with images. What are those images associated with (if anything)? Will they be reused througout the site in any way?
In its most simple form you can generate a new content type can name it image
you can add an imagefield to the new content type called image
you can remove the default body field that is generated when a new content type is created
you can add any other fields you may need that are associated with the image (if any)
you then go to node/add/image and generate your image nodes
once those nodes are saved to the database you can generate a view of those images in a page, or a block with the views.module.
If using Drupal to handle the images isn't something you want to do then again I state you can use your PHP skills and write a small block.module to randomly pull from the folder where the images are stored. To write a custom block module I suggest downloading the examples.module in contrib. Else if you don't want to write a custom block module you can enable the core phpfilter.module and add your php directly to a block body using the newly acquired php text format provided by the aforementioned phpfilter.module.
afterthought (mileage may vary as I am being very quick about typing the following out):
add your images folder to your theme folder
in it add the following and name it random.php
then call the rotate.php file from your css with something like:
note: #header is a placeholder. If you want it in a box in a sidebar or something you would have to alter the tpl.php file where the images are expected to be shown. If the entire site, use page.tpl.php. You would also have to alter the #header placeholder to match the div you set up for the images.
** the above is culled from the Drupal 6.x version of the marinelli theme where the functionality is used to generate random banner images. As the functionality bypassing Drupal handling of the images it should also work in Drupal 7.