php-windows Digest 25 Sep 2012 20:57:45 -0000 Issue 4070

Topics (messages 30954 through 30956):

Re: Is this a valid PHP code?
        30954 by: Jim MacDiarmid

Looking for reusable free gallery code.
        30955 by: Bill Mudry

Re: PHP 5.4 extension building problem
        30956 by: Jeff McKenna

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Yes,  looks valid to me.   Is it giving you an error somewhere?

Here is the code I was testing with:

<?php

function add_theme_support($support_type)
{
    $result = 0;
    return $result;
}

function apply_filters()
{
    $result = 0;
    return $result;
}

// This theme uses Featured Images (also known as post thumbnails) for
per-post/per-page Custom Header images
add_theme_support('post-thumbnails');

// Add support for custom headers.
$custom_header_support = array(
    'default-text-color' => '000',
    'width' => apply_filters( 'twentyeleven_header_image_width', 1000) ,
    'height' => apply_filters( 'twentyeleven_header_image_height', 180 ),
    'flex-height' => true,
    'random-default' => true,
    'wp-head-callback' => 'twentyeleven_header_style',
    'admin-head-callback' => 'twentyeleven_admin_header_style',
    'admin-preview-callback' => 'twentyeleven_admin_header_image',
);

echo "<pre>";
print_r($custom_header_support);
echo "</pre>";

    
?>



-----Original Message-----
From: Good Guy [mailto:xfs...@hotmail.com] 
Sent: Sunday, September 23, 2012 10:09 PM
To: php-wind...@lists.php.net
Subject: [PHP-WIN] Is this a valid PHP code?


Can somebody tell me whether this is a valid PHP code?

<?php
// This theme uses Featured Images (also known as post thumbnails) for
per-post/per-page Custom Header images
        add_theme_support( 'post-thumbnails' );

        // Add support for custom headers.
        $custom_header_support = array(
                // The default header text color.
                'default-text-color' => '000',
                // The height and width of our custom header.
                'width' => apply_filters( 'twentyeleven_header_image_width',
1000 ),
                'height' => apply_filters(
'twentyeleven_header_image_height', 180 ),
                // Support flexible heights.
                'flex-height' => true,
                // Random image rotation by default.
                'random-default' => true,
                // Callback for styling the header.
                'wp-head-callback' => 'twentyeleven_header_style',
                // Callback for styling the header preview in the admin.
                'admin-head-callback' => 'twentyeleven_admin_header_style',
                // Callback used to display the header preview in the admin.
                'admin-preview-callback' =>
'twentyeleven_admin_header_image',
        );
?>

I am trying to change the default header image size (in wp THEME 2011) to a
height of 180px but it doesn't seem to work and I don't know what is causing
the problem.

THANKS.


--
Good Guy
Website: http://mytaxsite.co.uk
Website: http://html-css.co.uk
Email: http://mytaxsite.co.uk/contact-us


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Greetings :-). Its been months since I posted ;-).

I wonder if any one can suggest any pre-existing script to build a photo/scan gallery (free and in PHP). I want the only entry
point for data to be me.

- I want total control over what goes up to be displayed. It is definitely not a gallery for the public to post on. This is the largest change I need over many packages that insist on first having the user upload photos through an included
    function. So .....

- I do not want some type of uploading feature to it but rather, each time a page the script is on is called, it should read all the thumbnails to display on that page from a folder I will declare and use on the server ..... not from a local computer.

- I want a simple system in which I will use a separate ftp package on my local computer to upload both the thumbnails and the larger size photos linked to by the thumbnails. (Years later I still use WS/FTP a lot ;-) ).

- It should have, of course, a parameter that tells how many (thumbnail) images across are displayed before
        dropping to the next line.

- I can store separate subtitles in their own column if I have to but it would be so much faster and keep photo files versus subtitles from getting out of sync if the desired title is actually encoded in the jpeg file name itself and decoded on the fly. Some of you may still remember my working on botanical names of different woods.

There is a high chance that I will have to make my own routine to break down the file name into the desired title. I have partly worked on that. I accept this as almost certainly a separate task I need to code from the other task of finding a gallery code that does not insist on uploading data to some obscure folder internal to itself. However, by this approach it must be coded to allow each photo file to be read, the photo to be displayed, call a routine to decode the file name into a subtitle and display it below that photo before heading off for
            the next photo to show.

I am wondering if I can just read each line in a folder and display each successfully without losing synchronization between photo and photo subtitle. If that does not work, I will fall back to a bit more complexity with using an MySQL table if I have to. .... Just trying to keep things simple and the photos easy and simple on adding and upkeep.

This next part is just a quick illustration of one likely title vs. filename encryption I am likely to use, perhaps more than is needed to
            ask for suggestions of a good candidate package ............
For a number of years while scanning different woods, I have named the files as: <genus name><underscore>epithet or species name><dash>><common name with underscores as needed>.jpg. Ex. -- Quercus_alba-white_oak.jpg should decode below the picture to Quercus alba ..... drop below ......
    White Oak
I realize otherwise they have to be stored in a 2 or 3 column table to show proper names and formatting.

I can start right from scratch if I have to ----- but it is always a good idea to check to see if there already is some good reusable code to
try before doing that.

Once I have the general code working nicely, I already have application for 3 different galleries all on the same website :-)

I am always thankful for the help you can provide.

Bill Mudry
Mississauga, Ontario Canada.


--- End Message ---
--- Begin Message ---
Hello Carlo,

I hit issues with PHP 5.4 with an extension for the MapServer project; I
believe the errors/changes could be similar (not Windows specific
however), so you can see the changes in our case needed at
https://github.com/mapserver/mapserver/commit/0d68cd5c06fa97a9d403c11e66d3ab99a16bc78d

Hope that helps.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 12-07-23 9:01 AM, Carlo Pastorino wrote:
> Hello everybody,
> 
> I have a project which uses a custom made php extension which adds some
> "native" functionalities and classes to the php framework on Windows.
> In order to build this extension I use a Visual Studio solution correctly
> configured (I guess) to add the correct php headers and preprocessor
> definitions.
> My problem is that my extension (and my Visual Studio project), which was
> working fine using php5.2 and php5.3, is giving me linking errors using
> php5.4.5.
> 
> In particular, I get the following error when building the extension:
> 
> unresolved external symbol "__declspec(dllimport) char const * (__cdecl*
> zend_new_interned_string)(char const *,int,int,void * * *)"
> (__imp_?zend_new_interned_string@@3P6APBDPBDHHPAPAPAX@ZA)
> 
> this symbol is used by the INIT_CLASS_ENTRY macro and should be defined in
> the zend_string.h header but, here I am totally guessing, I think some
> missing "#define" in my code is preventing my extension to be linked
> correctly.
> 
> However, enough with the talk, I prepared a simple Visual Studio 2010
> solution containing a very simple extension implementation which should let
> you see the problem.
> You can find it here:
> 
> http://neologica.it/test_ext.7z
> 
> Everything needed to build is contained with the archive. 
> The solutions contains 2 main configuration, *._5.3 and *.5.4 which
> respectively use php5.3 headers and lib, and php5.4(.5) headers and lib. By
> "lib" I mean the php5ts.lib found inside the php binary package under the
> "dev" folder.
> The first one builds and works fine producing the dll for the extension
> while the second one should display the error.
> 
> Can anyone help me with this issue? Or, at least, point me to someone (or
> somewhere) where I can find any help?
> 
> Thank you in advance,
> Regards
> Carlo Pastorino.
> 
> 
> 
> 


--- End Message ---

Reply via email to