Vengeance
Forum Replies Created
-
Daniel, thats what i tried first, but the problem is 2 variable images make for crappy code…lol, since each image is pulled by the loop that is.. i made it work with 2 images, but this will work for everyone without haveing to manually enter an image url into the javascript…2 images is not necessary I just filtered them once on mouse over, once on mouse out, to change it back…. however, the filters are not yet available for safari and the other mac browser, so you will only see it on a PC… anyway… heres how…
first off,
open notepad, and creat a file, calle filters.svg, then include this:
<svg xmlns="https://www.w3.org/2000/svg"> <filter id="grayscale"> <feColorMatrix type="matrix" values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"/> </filter> </svg>
save that file to your server, or through wordpress media… if it will let you… I just ftp’ed it up… then write down the url.. You are gonna paste it in where is have put ^^^^^ symbols.. it needs to be written in as follows..
https://www.yoursite/filters.svg#grayscale
its very important that you include the ” #grayscale” after the url.
next, under appearance > editor, you will go to loop_slider.php..
the next bit of java needs to be place immediately after
<li class="slide">
copy the following… and paste it in…
<script type="text/javascript"> function changebg<?php the_ID(); ?>(){ var x="<?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-thumb' ); ?>" document.getElementById('post-<?php the_ID(); ?>').style.cssText="background-image:url(<?php echo $thumbnail[0]; ?>); -webkit-filter: grayscale(1%); -moz-filter: grayscale(1%);"; } function changebgback<?php the_ID(); ?>(){ var x="<?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-thumb' ); ?>" document.getElementById('post-<?php the_ID(); ?>').style.cssText="background-image:url(<?php echo $thumbnail[0]; ?>); filter: url(https://^^^^YOUR-URL-HERE^^^^/filters.svg#grayscale); filter: gray;-webkit-filter:grayscale(100%);-moz-filter: grayscale(100%);"; } </script>
for the above…it needs to be in the loop because it has to run once for each time an image loads..technically, it is writing in the image id each time, and renames the functions to suit.. The first function is going to change the image to color on mouse over, and the second function is going to change it back on mouse out…
now we are going to set the images to grayscale as they load…
the original code that we are going to change, which daniel wrote, qhuite well, i might add.. comes immediately after the old
<li class="slide">
position.. find:<div id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php if( isset( $thumbnail ) ) : ?> style="background:url(<?php echo $thumbnail[0]; ?>) center no-repeat"<?php endif; ?>>
and paste in..
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php if( isset( $thumbnail ) ) : ?> onmouseover="changebg<?php the_ID(); ?>();" onmouseout="changebgback<?php the_ID(); ?>()" style="background-image:url(<?php echo $thumbnail[0]; ?>);filter: gray;-webkit-filter:grayscale(100%); filter: url(https://^^^YOURURLHERE^^^/filters.svg#grayscale);-moz-filter: grayscale(100%);"<?php endif; ?>>
the final product, starting from the php endif should look like this…
<?php endif; ?> <li class="slide"> <script type="text/javascript"> function changebg<?php the_ID(); ?>(){ var x="<?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-thumb' ); ?>" document.getElementById('post-<?php the_ID(); ?>').style.cssText="background-image:url(<?php echo $thumbnail[0]; ?>); -webkit-filter: grayscale(1%); -moz-filter: grayscale(1%);"; } function changebgback<?php the_ID(); ?>(){ var x="<?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-thumb' ); ?>" document.getElementById('post-<?php the_ID(); ?>').style.cssText="background-image:url(<?php echo $thumbnail[0]; ?>); filter: url(https://^^^^YOUR-URL-HERE^^^^/filters.svg#grayscale); filter: gray;-webkit-filter:grayscale(100%);-moz-filter: grayscale(100%);"; } </script> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php if( isset( $thumbnail ) ) : ?> onmouseover="changebg<?php the_ID(); ?>();" onmouseout="changebgback<?php the_ID(); ?>()" style="background-image:url(<?php echo $thumbnail[0]; ?>);filter: gray;-webkit-filter:grayscale(100%); filter: url(https://^^^YOURURLHERE^^^/filters.svg#grayscale);-moz-filter: grayscale(100%);"<?php endif; ?>> <div class="opacity"></div>
If i forgot something, let me know…but that should be it…
I like to see people learn, instead of just replacing a whole page, but if it was too confusing, i will just post the rewritten page to pastebin.
and Daniel, like i said before, It would be awesome if you included this or some version in the upcoming minimatica release :).. ill gladly help tweak it according to what you want.
When your done please post a link I wanna see what it looks like..
if you need a quicker answer on something email me here:
[email protected]
its an alias, but i will reply from my person email..Forum: Fixing WordPress
In reply to: Print imagelink your page pls..
Forum: Hacks
In reply to: Creating simplified CMS overlay for Admin dashboardassign user as author…. do not give full admin..
then the options are limited to..
post, media, comments, profile, tools… nothing else…Forum: Hacks
In reply to: Site made up entirely of widgetized zonesor you could make a second page.php, rename it ofcourse format it the way you like.. and auto forward from home to that page on arrival at your site..
Forum: Fixing WordPress
In reply to: Print imagei think (maybe) your variable is not passing to java…
try:‘echo ‘<script language=”javascript”>
function imprimer(){fenetre=window.open(“‘;
echo $url;
echo ‘” );
fenetre.print();
fenetre.top.close();
}
</script>’;also, (maybe)if there is more than one url in array $thumb[0] you should use a foreach statement…
had this happen before….
go to your cpanel…
https://www.reliancehomeblog.com/cpanelonce in, go to option phpmyadmin,
go to table wp_users…edit the admin user…
in a new window, go to…
https://md5encryption.com/
encrypt a new password…
copy encryption…
paste in password field,the password you will type in in the login screen will be the unencrpted version…
for example..
for password: newpass
you will put: e6053eb8d35e02ae40beeeacef203c1a in the user pass field,
and login with:newpassForum: Fixing WordPress
In reply to: Not able to run javascript on the pageyou need to tell it to run…
<script type="text/javascript" > function alertpage(){ alert("hello"); } </script>
then in the body tag….
<body onload="alertpage()">
Forum: Themes and Templates
In reply to: Minimatica – no video with supported format and MIME type founddid you convert the videos? and have you checked the full file name… sometimes, you’ll get a video.webm(.avi) the .avi is hidden… or something…
Forum: Themes and Templates
In reply to: [Minimatica] Remove folded banner in Minimaticalink a page..im not exactly sure what you mean….
Forum: Themes and Templates
In reply to: Minimatica Sticky Footerglad to help both…Apres84, link your site, tell me what you want…
alwaysintuit…
what margins are you looking for?
my guess is you want to spread out the copyright, in which case its not in style.css…. it in bootstrap.csslocated here
wp-content/themes/standard/css/lib/bootstrap.css
you might try and looking in plugins editor, blog copyright, but you might have to do this outside of WP…the classes you are looking for are .span7 and .span5
shrink span7 to 460px and take.span5 to 460px
that puts your copyright on 1 line, aligned right…Forum: Themes and Templates
In reply to: how to add a table for images to Minimaticasure…
ok..here…
go to your dashboard, appearance, edit…
look on the right for content.php..
under <section class=”entry-content”>paste this…
<?php $custom_fields = get_post_custom(get_the_ID()); $my_custom_field = $custom_fields['postid']; $enddiv = '</div>'; $lcounter = 0; foreach ( $my_custom_field as $key => $value ){ if($lcounter == 0): echo '<div id="linksbar" style="width:100%; height:140px; float:left; display:visable; margin-top:10px; margin-bottom:10px;">'; elseif($lcounter/4 == 1): echo '<div id="linksbar" style="width:100%; height:140px; float:left; display:visable; margin-top:10px; margin-bottom:10px;">'; endif; echo '<div id="imageandlink" style="width:100px; margin-left:20px; margin-right:20px; height:100%; float:left;"><div id="yourimage" style="width:100%; height:100px; float:left;"><a href="'; echo get_permalink($value); echo '"><img height="100px" width="100px" src="'; echo get_the_post_thumbnail($value, 'small'); echo '"></img></a></div><a href="'; echo get_permalink($value); echo '">'; echo get_the_title($value); echo '</a>'; echo '</div>'; $lcounter++; } $newcount = ceil($i/5); echo str_repeat($enddiv, $newcount); ?>
go to your page or post, at the top right you will see screen options… click that, and then click custom fields…all you have to do now is scroll down to the custom fields area, and enter in the name column: “post id”
with no quotations….
then the the post id of the page you would like listed out… quick way to find it, open another browser window, and go to the page, look at the top, it should say page id 300 or 205 or whatever…
for each link you want in your page, add another, postid and number..
the code will automatically line up 4, and go to the next line, and make 4 more…
you also have to have a post thumbnail set….
load it up, tell me when its done and we will tweak from there…
Forum: Themes and Templates
In reply to: how to add a table for images to Minimaticayes, entirely do-able…
simplest but longest way is html… you gonna have to replace all of your links and images, and you gonna want to use 100px by 100px thumbnails… this is just simple html, i can help with some dynamic solutions, with less work on your end if you think you can handle it…reply back..
for this though, open the post or page, above the area where you enter content there is an option for visual or html, click html… then paste this, and fix the links…make sure to save…
<div id="linksbar" style="width:100%; height:140px; float:left; display:visable;">
<div id="imageandlink" style="width:100px; margin-left:20px; margin-right:20px; height:100%; float:left;">
<div id="yourimage" style="width:100%; height:100px; float:left;">
<img height="100px" width="100px" src="https://courtneyscottphotography.com/wp-content/uploads/2012/06/IMGP4234-600x400.jpg"></img>
</div>
<div id="yourlink" style="width:100%; height:40px; padding-top:10px; float:left; text-align:center;">Inle Lake
</div>
</div>
<div id="imageandlink" style="width:100px; margin-left:20px; margin-right:20px; height:100%; float:left;">
<div id="yourimage" style="width:100%; height:100px; float:left;">
<img height="100px" width="100px" src="https://courtneyscottphotography.com/wp-content/uploads/2012/06/IMGP4234-600x400.jpg"></img>
</div>
<div id="yourlink" style="width:100%; height:40px; padding-top:10px; float:left; text-align:center;">Inle Lake
</div>
</div>
<div id="imageandlink" style="width:100px; margin-left:20px; margin-right:20px; height:100%; float:left;">
<div id="yourimage" style="width:100%; height:100px; float:left;">
<img height="100px" width="100px" src="https://courtneyscottphotography.com/wp-content/uploads/2012/06/IMGP4234-600x400.jpg"></img>
</div>
<div id="yourlink" style="width:100%; height:40px; padding-top:10px; float:left; text-align:center;">Inle Lake
</div>
</div>
<div id="imageandlink" style="width:100px; margin-left:20px; margin-right:20px; height:100%; float:left;">
<div id="yourimage" style="width:100%; height:100px; float:left;">
<img height="100px" width="100px" src="https://courtneyscottphotography.com/wp-content/uploads/2012/06/IMGP4234-600x400.jpg"></img>
</div>
<div id="yourlink" style="width:100%; height:40px; padding-top:10px; float:left; text-align:center;">Inle Lake
</div>
</div>
<div id="imageandlink" style="width:100px; margin-left:20px; margin-right:20px; height:100%; float:left;">
<div id="yourimage" style="width:100%; height:100px; float:left;">
<img height="100px" width="100px" src="https://courtneyscottphotography.com/wp-content/uploads/2012/06/IMGP4234-600x400.jpg"></img>
</div>
<div id="yourlink" style="width:100%; height:40px; padding-top:10px; float:left; text-align:center;">Inle Lake
</div>
</div>
</div>
Forum: Themes and Templates
In reply to: [Minimatica] Bold Text in Menu- MinimaticaGo to your dashboard, hover over appearance, click on editor. It should take you directly to Stylesheet(style.css)..
Hit ctrl+f and search for “.nav ul li a” without quotes…
if correct you should find
.nav ul li a { display: inline-block; padding: 5px 0; color: #555; }
the color might be different, but anyway, to make it bold add:
font-weight:bold;
put it on its own line between the { and }
so it should look like this..
.nav ul li a { display: inline-block; padding: 5px 0; color: #555; font-weight:bold; }
lastly, depending on how many menu items you have, you may need to shrink the margin…so save, look at your home page, if it looks good… stop……
if they are wrapping to next line due to having 6 or more,..
go back to where you were, ctrl + F again, ” nav ul li” this time..
.nav ul li { float: left; height: 34px; margin: 0; margin-right: 36px; margin-left: 44px; vertical-align: middle; }
you will lower the number of your margins left and right…
its gonna be a guess and check… so I would start with dropping them to 35 each… make sure to only change the number of margin-right:36px; and margin-left:44px;
should look like this
.nav ul li { float: left; height: 34px; margin: 0; margin-right: 35px; margin-left: 35px; vertical-align: middle; }
if you have drop down menus, please let me know before doing this… there’s other ways…
Forum: Fixing WordPress
In reply to: "Minimatica" Theme. Can't get rid of "posted by" "on date" textphoenix…
answer… depends on your layout.. go to edit your post, on the right hand side, there are a few options for format.. figure out which one your using and read below… If you want the whole thing gone, delete the entire section that i post… if you only want individual lines removed, delete the entire line starting immediately before
<li>
to immediately after</li>
so to delete written by, you would delete:
<li><?php _e( 'Written by', 'minimatica' ); ?> <?php the_author_posts_link(); ?></li>
if STANDARD, ASIDE or LINK look in content.php for:
<aside class="entry-meta"> <ul> <li><?php _e( 'Written by', 'minimatica' ); ?> <?php the_author_posts_link(); ?></li> <li><?php _e( 'on', 'minimatica' ); ?> <time datetime="<?php the_time( 'Y-m-d' ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></time></li> <li><?php _e( 'Filed under', 'minimatica' ); ?> <?php the_category( ', ' ); ?></li> <?php edit_post_link( __( 'Edit', 'minimatica' ), '<li>', '</li>' ); ?> </ul> <?php the_tags( '<div class="entry-tags">', ' ', '</div>' ); ?> </aside>
if AUDIO, VIDEO, IMAGE, or GALLERY, look in corresponding content-audio.php, content-video.php, content-image.php, content-gallery.php for
<aside class="entry-meta"> <ul> <li><?php _e( 'Posted by', 'minimatica' ); ?> <?php the_author_posts_link(); ?></li> <li><?php _e( 'on', 'minimatica' ); ?> <time datetime="<?php the_time( 'Y-m-d' ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></time></li> <li><?php _e( 'Filed under', 'minimatica' ); ?> <?php the_category( ', ' ); ?></li> </ul> <?php the_tags( '<div class="entry-tags">', ' ', '</div>' ); ?> </aside>
As stated above, usually good to back things up…
Forum: Fixing WordPress
In reply to: Removing featured image thumbnail from postLamXavier… its actually a combination of two things..
in your case, its being called by content-gallery.php and looks like this…
<?php minimatica_post_gallery(); ?>KEEP READING..DONT DELETE ANYTHING YET.
My suspicious is that on the post, say for example, your post 17, “Urban” when making the post, you checked off gallery view on the right hand side of the “new post” screen.
Since you have next gen gallery running aswell…
You have 2 choices…
you can change the post format back to standard..once you change that, you will remove
<?php the_post_thumbnail( ‘single-thumb’ ); ?>
from content.php …HOWEVER…If your gonna use nextgen Gallery From here on out…
I would edit the content-gallery.php file, and pull out
<?php minimatica_post_gallery(); ?>
and use nextgen, and you also will only mess up the gallery post template, as opposed to you content.php file…