Editing Included Content In Customized X-Cart PHP Page - php

My clients home page is https://www.quakereadykit.com/store/home.php
This was given to me by a previous designer, and I cannot figure out how to do the simple task of changing the small photo next to the "Welcome" text. I have used Firebug in FF to try and dissect the page but I cannot find the source. Seems to be an include from another file.

Maybe I'm missing something, but it seems to be an image called "kitad.gif" residing in the "/images/" directory (i.e. a folder called "images" just underneath web root).
If you can't find the code into which it's embedded, then you could replace it by uploading a new image with the same name and (ideally) the same dimensions into the same folder.

Related

Dropbox get public url of the file after upload

Need to upload files to dropbox and get the public url of that file. I'am generating thumbnails and need to show that in my site. I should also show the original files to users without login to the dropbox site.
After uploading to dropbox I need to get the original file url which will be used by crocodoc api viewer.
I could able to upload the file and I am getting the metadata of that file. I created shared url and given that url that url img tag in html but seems returning as html instead of image.
I have gone through similar questions mentioned in SO but almost all are referring old documents.
I found this trick earlier and thought I'd share.
Go to: https://www.dropbox.com/home
Then, highlight your mouse over an item, click on share.
This will popup:
Simply change:
https://www.dropbox.com/s/io9oz94lgm2j2bb/loadingscreen.jpg?dl=0
to
https://dl.dropbox.com/s/io9oz94lgm2j2bb/loadingscreen.jpg
Replacing the www with dl, to get the direct, public url.

Could my file structure be causing the issues with my photo upload system?

I'm trying to create a photo upload system following Adam Khourys online tutorials.
http://www.developphp.com/view.php?tid=1395 - Upload multiple files video
http://www.developphp.com/view.php?tid=1304 - User profile upload
Most of the code is like for like, but with my own variable names used instead. One major difference is instead of creating 3 different file upload fields as in the multiple upload video I created my form to allow multiple selections from just one upload field.
Below is a brief overview of the files, their location and what the page does.
create_post.php located in root directory - the page that allows for image upload
image_uploader.php located in root > includes directory - the page that contains the upload form, made as a seperate file to be included into any page that may require photo uploads.
photo_system.php located in root > parsers directory - the page that handles image upload.
When I go to the create a post page, click the link to upload image(s) all works well, I can see the form, I can even select the files I would like to try and upload but when I click the upload button nothing seems to happen, when photo_system.php should load.
I've added a line of code to photo_system.php right at the top that should bring up an alert box once the page has loaded, in an attempt to debug my issues, but I never see this unless I go directly to image_uploader.php
This has lead me to believe that maybe my relative links to files were the issue so I've tried appending $_SERVER['DOCUMENT_ROOT'] to the start of the links to ensure it can alway locate them from the root directory, currently I have it set up with a hard coded $root variable and still I can't seem to get the system to work.
Is it likey that the file structure and the way the pages interact with each other is my problem? Could anyone take a look at my code for these three files and see if they can spot anything? I've been stumped by this for a week or so now so I think its time to ask for some outside help.
I have my 3 files saved in a txt format so the code can be viewed
http://www.vwrx-project.co.uk/temp_source_code/create_post.txt
http://www.vwrx-project.co.uk/temp_source_code/image_uploader.txt
http://www.vwrx-project.co.uk/temp_source_code/photo_system.txt
It turns out that in the end I was trying to nest two tables one inside the other so this was part of my issue.
The way that I had it set up I was including the photo upload system, image_uploader.php, as a table with an action requesting the photo_system.php file which worked when I went to the image_uploader.php page directly.
I also had in my main page where the images were being uploaded a form that had been set to onsubmit = false and this was canceling out the form action of the included file.
I only found this out when I decided to try and code it straight into one file else I'd still be stuck now.

Edit the mediawiki uploaded file name

In Mediawiki, we are uploading video using mediawiki api. Its uploading fine.It will be creating as a page like "File:Test.mp4". Now we want to edit the page title alone (Like "File:Test.mp4" to "File:Sample.mp4, but the video will be same). Kindly suggest any solution for editing.
To rename a MediaWiki page, you move it. This can be done with the API, if you don't want to move it manually:
/api.php?action=move&from=File:Test.mp4&to=File:Sample.mp4&token=xxxx
When you move a file page, the corresponding file will also be renamed. A redirect will be created from the old file page, so that both [[File:Test.mp4]] and [[File:Sample.mp4]] works throughout the wiki.

wordpress categories missing images

Okay so I have a wordpress site.
for example wordpress.com
On it I have a page called sports, I took some of these pages and put them under the page 'summer'
So the url is now www.wordpress.com/summer/sports
However all the images are in wordpress.com So all the pages under the page summer, can't see those images and all you have are image frames.
If you create the directory summer and put images in it, It will make it so when you go to www.wordpress.com/summer/sports, you will be taken to a blank page with only a single image.
So making a directory under the page name actually messes with wordpress and makes that page unreachable.
I presume you have used a relative path to the images on your pages, so when you moved them they no longer know where the image is in relation to the relative path. Using an absolute path would solve this issue (e.g. http://wordpress.com/myimages/test.png) you can then move your pages anywhere and they will always pick up the image or you need to change the relative path.
See here for explanation of relative & absolute paths: http://webdesign.about.com/od/beginningtutorials/a/aa040502a.htm

Any way to link to the background image url in CSS without providing the full url (ie. local path)?

Say for example I have embeded the following CSS file:
http://site.com/tpl/theme_name/stylesheet.css
In the header of my site...
http://site.com
and the CSS file contained the following (in one of its lines)
background-image:url(images/background.gif);
But the actual url to images/background.gif is:
http://site.com/tpl/theme_name/images/background.gif
The CSS would not recognise the image right? (because the CSS file is not providing the full url).
The problem is although I can add the full url within the CSS file for the background image to show, I don't want too...because if for some reason the theme name got renamed it will mean I'd have to manually edit all the CSS files for the themes.
So I was wondering is there any way around this ie. could I do something like ../images/background.gif (append dots)?
PS: I know I can just do so in PHP by writing a wrapper file which replaces the url with the full one, and sends the appropriate header (CSS) - but that may be resource intensive?
The CSS would not recognise the image right? (because the CSS file is not providing the full url).
URLs inside the CSS file are relative to the CSS file's directory, so what you show should work just fine.
(This will no longer apply if you change the URL path later using JavaScript, but I don't think that's the issue here.)

Categories