Inserting .SWF(flash) file into my theme? Inserting .SWF(flash) file into my theme?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Inserting .SWF(flash) file into my theme?

Started by Vforum, April 09, 2009, 03:27:33 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Vforum

I was wondering if it is possible to use a .swf(flash file) for my header. I have done some research, and discovered a couple of things:


  • -css doesn't support usage of .swf(correct me if I am wrong)
  • -inserting a .swf file into template.html won't work(keep getting just a white bar)
(keep in mind pls, I do have installed flash components)


Objective: Problem seems to me, that entire cpg is based on css. I basically want to replace the current background: url(images/headerbg.gif) from the theme i-feel-durty into a same size(760x143) flash file.
(please view image attachment, I marked in pink what I want to replace with flash)

Compromise:I do understand I will lose {GAL_NAME}{GAL_DESCRIPTION} option inside the header, but this is np to me becaus I will manually add that inside the SWF, and delete those 2 inside template.html.

Reason: .gif .jpg files are good in general, but I want to use a more detailed image, and ofc adding some "flashy" elements to make it more eye apealing to my few users and myself.(with flash I can zoom in pictures, retaining small size of file/picture/+eye-candy flash elements)

using:
cpg: 1.4
theme: i-feel-dirty
aditing program: dreamweaver
skill: noob (just know some commen sence editing :))[/list]

Vforum

Almost forgot to mention:

QuotePath to custom header include
Optional relative path to a custom header file. Using this option, you can include non-coppermine code bits to be included into your theme, e.g. an overall navigation that gets included on your whole website. You can only add a relative path (seen from the root path of your coppermine install) - not an absolute one, nor a http include from another website. This option is only meant for experienced users who have some PHP know-how.

Warning: you mustn't include full html pages that contain an html header or footer (tags like <head> or <body>), nor can the included file do file header manipulation, e.g. reading another (non-coppermine) cookie.


I do know there is a way to make a custom header, but this is a mistery to me, since the discription given in Coppermine Photo Gallery v1.4.21: Documentation and Manual About Coppermine don't help me that much.
Not to mention it gives me a nice warning aswell: "This option is only meant for experienced users who have some PHP know-how."

Joachim Müller

Quote from: Vforum on April 09, 2009, 03:27:33 AM
I was wondering if it is possible to use a .swf(flash file) for my header.
Sure, just edit themes/yourtheme/template.html, using plain HTML

Quote from: Vforum on April 09, 2009, 03:27:33 AM
  • -css doesn't support usage of .swf(correct me if I am wrong)
Wrong
Quote from: Vforum on April 09, 2009, 03:27:33 AM
  • -inserting a .swf file into template.html won't work(keep getting just a white bar)
Use the proper HTML syntax to avoid the white screen.


Quote from: Vforum on April 09, 2009, 03:27:33 AMObjective: Problem seems to me, that entire cpg is based on css. I basically want to replace the current background: url(images/headerbg.gif) from the theme i-feel-durty into a same size(760x143) flash file.
(please view image attachment, I marked in pink what I want to replace with flash)
The background-attribute can indeed not contain reference to a flash file, but only an image file. But this is not related to coppermine, but to the way CSS works and how browsers work.

Quote from: Vforum on April 09, 2009, 03:27:33 AMCompromise:I do understand I will lose {GAL_NAME}{GAL_DESCRIPTION} option inside the header, but this is np to me becaus I will manually add that inside the SWF, and delete those 2 inside template.html.
Why? Nonsense!

Quote from: Vforum on April 09, 2009, 03:27:33 AMReason: .gif .jpg files are good in general, but I want to use a more detailed image, and ofc adding some "flashy" elements to make it more eye apealing to my few users and myself.(with flash I can zoom in pictures, retaining small size of file/picture/+eye-candy flash elements)
Sure, go ahead.

Quote from: Vforum on April 09, 2009, 03:27:33 AMusing:
cpg: 1.4
theme: i-feel-dirty
aditing program: dreamweaver
skill: noob (just know some commen sence editing :))
Sure, whatever. Instead of posting this irrelevant information, why don't you just post a link to your gallery for a start and a deep link to the flash file that you would like to see embedded, as per board rules? Don't use Dreamweaver to edit Coppermine! Use a plain text editor instead.

Only three days ago someone has reported issues with his flash-driven banner that were solved easily: see how flash-driven banners can be accomplished easily http://forum.coppermine-gallery.net/index.php/topic,58887.0.html

Quote from: Vforum on April 09, 2009, 03:46:04 AM
Almost forgot to mention:

I do know there is a way to make a custom header, but this is a mistery to me, since the discription given in Coppermine Photo Gallery v1.4.21: Documentation and Manual About Coppermine don't help me that much.
Not to mention it gives me a nice warning aswell: "This option is only meant for experienced users who have some PHP know-how."
The custom header is not meant to spice up your site using a flash-driven animation. It's meant to include a custom PHP script. Forget about that option, it's beyond your skills currently and not needed at all for what you're trying to accomplish. You lack basic HTML skills that you'd need as well to use the custom header feature.

Vforum

Ok sounds cool :D

I will try figure this out. Will post, if and how I solved the problem.

Thank you for your fast response, I kinda gave up on the idea of using a flash header!
8)(gonna have a cool flashy header after all) 8)



O and yea, sorry but I rather not post a link to gallery, since I use it more for private stuff, gallery for my friends and me. Also gave gallery users alot freedom, peaple can signup(for the moment), and post everything without need for me to aprove ... so don't  want to risk it.

Hope you understand


Vforum

Quote from: Joachim Müller on April 09, 2009, 07:58:37 AM
Sure, just edit themes/yourtheme/template.html, using plain HTML

Ok :) I have learned something new, and solved my problem by simplifing the code to a minimum:
WRONG PATH:
<embed src="myfile.swf" width="760" height="143">
</embed>

after looking at the at the index.php page(where the coppermine gallery site is operational), it seemed not to work, and when looking at the template.html file, everything seemed to be working correctly.
This could mean only 1thing: my path to the file wasn't correct, becaus index.php was located on another location, meaning it was looking in the root folder of the CPG instalation(same path as where index.php was located).

SOLUTION: <embed src="themes/mytheme/myfile.swf" width="760" height="143">
</embed>

Joachim Müller

Quote from: Vforum on April 09, 2009, 02:14:52 PM
O and yea, sorry but I rather not post a link to gallery, since I use it more for private stuff, gallery for my friends and me. Also gave gallery users alot freedom, peaple can signup(for the moment), and post everything without need for me to aprove ... so don't  want to risk it.

Hope you understand
No, not really. Security by obscurity is a very bad and silly concept that only newbies use untill they got hacked or abused otherwise. The internet is a public place. It doesn't make sense to play those games, as your description sounds similar to thousands of galleries I've seen when doing support work. Anyway, it's your choice... No link, no support.

Quote from: Vforum on April 10, 2009, 10:15:14 AM
Ok :) I have learned something new, and solved my problem by simplifing the code to a minimum:
You simplified the code? Come on, who are you? Tim Berners-Lee? You better use the full code untill you have learned what all the stuff you removed is needed for. You're drawing false conclusions: just because it appears to work for you, it will not necessarily work for others. That's why standards exist. Respect them. <embed src="themes/mytheme/myfile.swf" width="760" height="143"></embed>is not enough.

Quote from: Vforum on April 10, 2009, 10:15:14 AM
after looking at the at the index.php page(where the coppermine gallery site is operational)
Nobody said that you should edit that file. Read up the docs - they explain clearly what file to edit, as well as the other thread that I have refered to.


Vforum

Well I didn't say I was done  ;), probebly my mistake... schould have said what I ment.

I just wanted to tell you what I was doing wrong, and it was the path, since I forgot the cpg was running from index.php, and NOT template.html, so my path was wrong.

Now I am trying to keep the {GAL_NAME}{GAL_DESCRIPTION} functions as you sugjested. Apperantly(googled it) the following code schould do that:
<param name="wmode" value="transparent" />

But I am having trouble with it, since .swf file is still on top.


btw, setting up a test site now, will give you all the links, and how the hell can I edit my messages? probebly disabled so nobody can change asnwers (securaty reasons)

Joachim Müller

Quote from: Vforum on April 10, 2009, 10:36:10 AM
how the hell can I edit my messages?
Not at all. Don't swear!

Quote from: Vforum on April 10, 2009, 10:36:10 AMprobebly disabled so nobody can change asnwers
Actually this hasn't been disabled because people changed answers, but because they edited out the questions once they were solved, leaving the answer meaningless and the thread useless.

Quote from: Vforum on April 10, 2009, 10:36:10 AMsecuraty reasons
Security is not related. Security is in fact an entirely different animal.

Vforum

QuoteSecurity is not related. Security is in fact an entirely different animal.
If peaple change the aswer code, and put in some stuff that could damage peaples cpg, or even more... thats what I thought ^^, but yea it is kinda the same thing as you sugjested, anyways back to topic:

Here are the links to test site:
CPG index.php http://valkyr.eb2a.com/cg/index.php
template.html http://valkyr.eb2a.com/cg/themes/i-feel-dirty/template.html
.swf file http://valkyr.eb2a.com/cg/themes/i-feel-dirty/headerbg.swf

Sorry for the long w8

As you can see, it looks like a mess, I have inserted it with dreamweaver btw

Joachim Müller

You haven't respected the expressed wish of the theme author to preserve his unobstrusive credits, so I have decided not to support you in this aspect - you're not worthy to get support if you have no respect for the work of others.
This thread is open for other potential takers. I'm out of it.

Vforum

Ok, well thank you anyways for the help, wouldn't have discovered that my path was incorect without you.

you have pushed me into the right direction!

Vforum

 Just discovered something new, and yes, it is nonsence to lose {GAL_NAME}{GAL_DESCRIPTION} options.

My .swf file was by exident below the Main content area for some reason... then I relized that the <dev> where set to float, in the css files :). Now I just got to figure out how to propperly set my head1 and head2 devision part set to float, so that when I insert my .swf file into header devision, that it is below the 2floating head1 and head2 devisions.

8) Thank you for not supporting me in this aspect, figuring stuff out by myself, gives more satisfaction  8)