« Previous Blog Next Blog »  

Yet more Old Computers


Article created:- November 8, 2020 12:23 pm
Last modified:- July 16, 2021 12:35 pm

Written by:- MJS

Filed and cataloged as:- News

PC mode sees me buying (yet) another blooming computer, .. (yet) again. Last years purchase of the second hand HP kept overheating, especially with all the added software that I was loading onto it.

** Mainly a program called Local, that gives you a blindingly fast local environment for you website development, but funk me does it ever hammer the memory and processors.

The (new-old) computer that I’ve purchased is a revamped Toshiba from an online company called the cheaplaptopcompany, and their caring customer service so flippin good; that I ain’t even gonna’ give the robbing funking bunch of thieves a sodden courtesy link.

An old PC

 

This is what I bought from them, that was cordially described on their flashy website as a Toshiba Portege Z930 17 i7-3687U Laptop, Ultrabook, 8GB RAM, 120GB SSD, HDMI with Windows 10 installed, it also included a three month warranty.

That in actual fact, is worth Jack Shit!

I can say that hand on heart, because the high spec machine turned up with only 6GB of Ram installed, instead of (8). One (polite) email later, and the company’s metered response was to open a customer support ticket with the software department: who would advise me on setting up my machine, (that I’d obviously got wrong), but they are busy, so please bare with us!

How you, (or anyone), could get the POST wrong is a somewhat bemusing concept.

POST = Power On Self Test, is a power up test: that the machine does independently of anyone; as it — (by itself), tests such things as the type of motherboard, the processor(s) and speed, the usb ports available, and of course, the all important type of memory banks onboard, and their GB value.

I suppose that the many ignorant users out there might well fall for it, but I didn’t: I know bullshit when I hear it.

Now, .. I’m not saying that spending the £289:00p on the machine was a waste of money: it is unbelievably fast, and it also has that magic keyboard layout of Home PgUp PgDn and End on the edge, but it could have been even better and faster with that extra memory that I paid for.

** BTW, the reason that it only has 6GB, is because the first set on memory modules are actually soldered in, ..
A salient fact that the cheap-jerks working at the cheap laptop computer company, knew all about when they (palmed it off), sorry: that should have read, – dispatched it.

I’ve also found out that my email address has been taken off of their subscription list, as I say: bunch of thieves.

 


 

So with my latest (new-old) machine ensconced at home; my personal book writing should have gone through the roof, but it hasn’t: never-the-less, I have been busy, honest, ..
(Piffle.)
It’s just that I’m practically devoting all of my precious time to coding and prettying up this wretched website, that’s now become an overriding obsession.


In script kiddie mode, this old kiddie is now going down deep and dirty, muffing right down into the dark-side PHP coding, and I began this fools errand because I wasn’t happy with the current crop of crappy looking, — spy based ‘Themes‘ out there.

** And I was convinced that I could do better!

The fool standing on the hill of dreams, (beans), began writing her own stupid theme, simple I thought six seven eight months ago, and it was simple, but what wasn’t so simple; was the constant fiddling that I’m doing with the site, and I haven’t even started designing a Mobile or iPad sized version of my web portal.
So much for “mobile first.”

Externally, .. the ideal website that I had in mind, was one that kinda’ resembles the old style touch screens in the, {last of the first}, Star Trick (c) series, and to a degree; it’s easily achieved in employing the css grid to lay it out, but getting the color codes, curved page layouts, and especially the large rounded buttons to mix and match is much harder than I first thought, but it is getting there.

Internally, .. the POD plugin for creating new POST Types blows my mind, especially with that you can make WordPress do, all I can say after getting to grips with it is, — WOW!

From it: I now have several new POST Classes.
–> the first is called SERIES.
–> that connects to BOOKS.
–> that is made up with CHAPTERS.
–> that is built with individual RESEARCH-PAGE(S), that are relationally linked back into various other CHAPTERS that make up the BOOK.

The RESEARCH-PAGE tag(s) themselves link back to individual CHAPTER tag(s), but also into the general BOOKS database as well: all achieved via the character(s), plot(s) (major and minor), and of course not forgetting the all important – location – location – location page(s).

The Challenge, .. is coding the actual display pages in the PHP language, and god’s honest truth here, it has been a nightmare from start to finish; especially in getting the database relationships right in the all important html css and php coding.

Here’s the PHP glue that simply links SERIE(S) with BOOK(S).

<?php 
        // get Pods object for (from) the [current]-post.
  $pod = pods( 'SERIES', get_the_id() );
        // get the value for the relationship field.
    $related = $pod->field( 'related_books' );
        // Below we loop through related field, creating links to their own pages.
        // Go, but only if there is anything to actually loop through.
    if ( !empty( $related ) ) 
    {
    echo '<p>The books listed in this series are as follows:-</p>';
        // Now, fill in the associated Books with the Series.
    foreach ( $related as $rel )    // Get id for related post and put in ID
    {  
        // For advanced content types use $id = $rel[ 'id' ];
            $id = $rel[ 'ID' ];
        
        // My grid nightmare stuff is as follows, ..
        // -- Start the inner child grids: NOTE: this stuff *** can be ignored, ..
            echo '<div class="card-row">';       
        // *** [ Grid setup to display on 1/4 right hand side. ]
        echo '<style> .card-image { height: 400px; } </style>';
        echo '<div class="card-image">';
          
        // You need to make a variable image, to thusly show the featured image of the post.
        $image = wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'medium' );
/* 'book-thumbs' is another one to try, 
        .. But the 185x300 is good, 
        .. Included below is what's returned via the 'wp_get_attachment_image_src()' function.
   array,
    >>>> NOTE: THE ARRAY FOR THE PICTURE IMAGE IS AS FOLLOWS.  <<<<
   {
     [0] => url,
     [1] => width</em>
     [2] => height</em>
     [4] => is_intermediate
   } */
          
     echo '<div class="flex-column">';      /* <!--// *** create the child grid ell to house the picture image //--> */
         
/* <!--// Spread it out on one long line with no page breaks, can screw it up somewhat otherwise. //--> */
echo '<img class="img-off" src="' . $image[0] . '" alt="' . $image[3] . '" width=' . $image[1] . '" height=' . $image[2] . ' style="margin: 5px 0 5px 0;" >';
    echo '<br>';        /* Shuffle down a line. */
/*<!--//  This is just an infill image at the bottom.
    Basically I've put in to balance-off the cell against the text in the other cell, ..
    Otherwise the picture looked lost. //--> */
    
    echo '<img class="img-off" src="' . $theme  . '/images/Flur-Acorn-Gra.png" width="140" height="40" >';
    echo '</div>';
          
/* Grid styles for pictures only, ..
    I can ignore because all of my books have accompanying art-work set at the right size. */
       
    echo '</div>'; // *** end of class="card-image" -- which is part of the grid stuff.
            
## <<< Center split HERE! -- *** -- Mind the middling bloody GAP! >>>>
            
      // ***  [ Grid setup to display on 3/4 left hand side. ]
    echo '<div class="card-content">'; 
      // *** New part of the grid stuff, in this one holds actually the text on the right hand side.
                
      // Firstly, we get the value for the book_number field in the related post, .. 
      // - And then build the bookish book_Num string.
    $book_Num = get_post_meta( $id, 'book_number', true );
    $book_build = 'Book Number [ ' . $book_Num . ' ]';         
      // Secondly, we now show the related post name as link.
    echo '<a id="bxtn" href="' . get_permalink($id) . '">' . get_the_title( $id ) . '</a><br><p style="text-align:center"><small>' . $book_build . '</small></p>'; // Once again we note to keep it all on one long line of text with no carriage returns or page breaks.
    
      // 2.a wrap a font-Resizer here round the excerpt .. *** 
    echo '<div id="innerbody">';    
      /* <!--// *** Used for externally sizing the fonts with B92-Zeno plugin, .. //--> */

## Note:- the above div has nothing to do with getting the POD stuff out of the post and then printed on the screen, ..       
      // Thirdly, we place some content -> in here -> from the related book(s) excerpt.
    echo '<p><small>' . get_the_excerpt( $id ) . '</small></p>';
      // The stuff below is simply eye-candy for the text block, .. 
      // - Plus it also tells you where we are in relation to the Book for-each (next loop) should there be an error.
    echo '<p style="text-align:right; color:red;"><small><em>[ click the link above to read more ]</small></em></p>';  
    echo '</div>';
     // 2.a -- *** end of the wrapper div for smaller or bigger fonts ..
## Once again note:- 
## the above div has nothing to do with getting the POD stuff out of the post and then printed on the screen, .. 
      // Added extra stuff here for administrators only, ie: Me!
    set_edit_link( $id );
    echo '<br>';    
    echo '</div>';    // *** end of class="card-content" -- grid divs as yet another one is closed.
    echo '</div>';    // End of class="card-row" -- major grid div being closed here.
## Back to normal POD land from here on in, ..
    echo '<br /><br />';

        }                 // End of (foreach) brace, ..
    }                     // End of endif ! empty ( $related ) brace, ..
?>                       <!--// End f PHP brace, and back into the normal land of the living. //-->

** Additional cross eyed-ness here, as a stumbling flailing running note: absolutely no one is expecting you to understand any of that crap above; the PHP code has been included to show you some of the inner workings of my new grid based website, and specifically how the marvelous POD plugin integrates with it.

I can in actual fact, go through the PHP code included with anyone should they so wish, just write a comment at the bottom to get my attention, but be warned: I’m not **thinking-out** your own PHP coding problems for you here.
This Muppet, all alone, but with Google as my reference guide; learned all this PHP->POD code stuff by trial and error, and I’ll have expected you to have done the same before asking for help.

The PODS Post classes and tags have all been constructed where the CHAPTER(S) and RESEARCH-PAGE(S) are concerned, the bottle neck here: is my precious time being devoted to creating the actual tabbed screen layout, and that’s where the data is going to be displayed on the front-end.

** Backend editing and touch-ups working fine.

So here ends my latest Blog update for what it’s worth, but I’ll mention something else whilst I’m in Blogging mode, .. and that is, we are all at the very start of our jolly old covid lockdown in November 2020.

(Sigh!) – This is going to be a long arsed boring month, and coding of the sort that I’m going to be undertaking here; requires social pressures to get it right, and that is something that’s not in abundance right at the moment.

 

Thanks for reading, Jessica: Praise be the ORI.

 

  « Previous Blog Next Blog »  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

March 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

WARNING!

localStorage Cookie info. This website uses simple cookies, and even simpler localStorage structures. (Enabling dynamic functionality.) They are not used for any other purpose.

To view this book site, you must be considered as an ADULT (with legal consent) in your current location to proceed any further. Failure to comply, could result in a criminal prosecution (within the local domicile) that you physically reside.

Theses web-pages aren't for children, nor any childish attitudes towards sexual ambivalence.
It is for -- ADULTS ONLY!

Pressing [ No! ] - Will take you away, to another type of less salubrious activity, that's obviously more suited to your young tender age (and/or) delicate disposition.

Only press [ YES! ] if you understand the terms. After that, a one year cookie will be set on your browser, thusly declaring you to be an adult, (a constitutional time-Warrior), with all of your timely facilities intact.

It's a big decision that you're about to undertake, choose wisely: because you can never go back.