Posts: 5
Threads: 1
Joined: Sep 2016
2016-09-08, 02:40:58
(This post was last modified: 2016-09-08, 02:42:48 by Dan71.)
Greetings Internets,
dunno if this is the right place to ask, so please move this one if it's not.
I'm trying to tweak the images in the summit theme. What I understand is that it can be done by replacing the original file with a file of the same name but with custom content. Shouldn't it be possible to use content of GS's image lib by tweaking the HTML code in header.inc.php ? I tried to point from there to the library at no avail, same goes for modifying the image size because the results are just too big.
Can someone explain how I do it right ?
Greets,
Dan
EDIT: I am on 3.3.11 with all lights green.
Posts: 6,266
Threads: 181
Joined: Sep 2011
do you mean the thumb.php image manipulation lib ?
or just uploads/ folder ?
Posts: 5
Threads: 1
Joined: Sep 2016
(2016-09-08, 02:56:12)shawn_a Wrote: do you mean the thumb.php image manipulation lib ?
or just uploads/ folder ?
I mean the uploads/folder.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Only problem is the theme might use image location set in css.
But you should just be able to change the urls for stuff
/data/uploads
Posts: 5
Threads: 1
Joined: Sep 2016
(2016-09-08, 03:13:21)shawn_a Wrote: Only problem is the theme might use image location set in css.
But you should just be able to change the urls for stuff
/data/uploads
Here's what I found:
<div id="banner"><a href="<?php get_site_url(); ?>" title="<?php get_site_name(); ?>" class="img-style"><img src="<?php get_theme_url(); ?>/data/uploads/static_tiles/dj-qf-logo-links.jpg" class="gs_image" height="182" width="659" alt="" /></a></div>
The above pointed originally to /theme/summit/images/img04.jpg. This is the theme's "mountain" picture.
Then, I tried to rename the image file and "repoint" it to /data[..] images folder at no avail. Also, I wanted the image to snug fit into the doorpage, so I altered the dims, but at no avail.
What worked was to to replace the original file with my custom one by uploading mine and renaming it img04.jpg as referenced in the source, but still cannot modify its dimensions.
Having said that, I'm not savvy in PHP, I am a network engineer.
D.
Posts: 6,266
Threads: 181
Joined: Sep 2011
get_theme_url() is
/theme
uploads are in /data/uploads
totally different place
Posts: 5
Threads: 1
Joined: Sep 2016
(2016-09-08, 03:36:52)shawn_a Wrote: get_theme_url() is
/theme
uploads are in /data/uploads
totally different place
I'm not entirely sure what I should do now do get it right.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Posts: 1,247
Threads: 82
Joined: Feb 2011
You can check the wiki on template tags.
http://get-simple.info/wiki/themes:template_tags
You don't really need php knowledge just know what these template tags do and where you position them.
It's also good to know the file structure of a GS site. Then you see that the uploads folder is: /data/uploads , while your theme folder is somewhere in /theme
Code:
img src="<?php get_theme_url(); ?>/data/uploads/static_tiles/dj-qf-logo-links.jpg
You can see here that the /data/uploads folder is supposed to be in the theme location, which is actually not the case.
If you would use instead something like:
Code:
img src="<?php get_site_url(); ?>/data/uploads/static_tiles/dj-qf-logo-links.jpg
Posts: 5
Threads: 1
Joined: Sep 2016
(2016-09-08, 03:51:58)datiswous Wrote: You can check the wiki on template tags. http://get-simple.info/wiki/themes:template_tags
You don't really need php knowledge just know what these template tags do and where you position them.
It's also good to know the file structure of a GS site. Then you see that the uploads folder is: /data/uploads , while your theme folder is somewhere in /theme
Code:
img src="<?php get_theme_url(); ?>/data/uploads/static_tiles/dj-qf-logo-links.jpg
You can see here that the /data/uploads folder is supposed to be in the theme location, which is actually not the case.
If you would use instead something like:
Code:
img src="<?php get_site_url(); ?>/data/uploads/static_tiles/dj-qf-logo-links.jpg
Datiswous,
that was the missing brick. Thanks for helping a PHP n00b - the image is now drawn from the right source. I was also able to adjust the dimensions.
-> How would I go about having the pic aligned in the center ?
Posts: 1,928
Threads: 88
Joined: Apr 2010
Only slash is not needed after the code get_site_url();
Code:
img src="<?php get_site_url(); ?>data/uploads/static_tiles/dj-qf-logo-links.jpg