GetSimple Support Forum

Full Version: Modifying Images
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
do you mean the thumb.php image manipulation lib ?
or just uploads/ folder ?
(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.
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
(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.
get_theme_url() is
/theme

uploads are in /data/uploads
totally different place
(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.
use
get_site_url()
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
(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 ?
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