• semazen

    (@semazen)


    Hi,

    Is there a way to run the entire script inside a table in a PHP page?

    I have tried this by adding:

    <?php
    require(‘./wordpress/wp-blog-header.php’);
    ?>

    at the top of a php page and:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php the_date(”,'<h2>’,'</h2>’); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h3 class=”storytitle”>” rel=”bookmark”><?php the_title(); ?></h3>
    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category(‘,’) ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__(‘Edit This’)); ?></div>

    <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?>
    </div>

    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>

    </div>

    <?php comments_template(); // Get wp-comments.php template ?>

    <?php endwhile; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>

    within the table. While this looks ok (except that the right hand nav is missing), clicking any links on the page reverts to the script’s original layout.

    Example: https://mpk.net.au/emag.php

    Alternatinely, can one add a header and footer (like most other scripts) to integrate WordPress into one’s own layout?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • niziol

    (@niziol)

    I’m not sure exactly what you’re trying to do, but maybe giving the Theme Development article on the codex a read might help you out a little bit.

    My opinion on tables is that one should stay away from them if one can. CSS is the way to go!

    lhk

    (@lhk)

    Hi,

    ..CSS is the way to go!..

    Not for everyone and not everywhere. This is one of the most annoying misconceptions of geeks from 1st world countries and it renders many CMS absolutely useless for webmasters catering to second and third world usergroups.

    What many geeks cannot even conceive of, mentally, is that there are huge usergroups out there in the world which do not have (access to) computers above 486 or earliest pentium level, which use browser below, in parts far below, IE 5 and Netscape 4 level, which are online on thin modem lines (not necessarily 56kb Modems either) and which have a net income per month of way under 100 USD.

    These people still need the internet standards of the day before yesterday, anything else quite simply won’t work. Try it out, simulate accessing websites maintained by CSS-geared CMS using e.g. Win95 (or even 3.11) with a Netscape 3 or 4 or an IE 4 (and that’s a must, as these computers simply didn’t have the HD space to accommodate any system better than that).

    Whoever has to cater to such usergroups (I do with several quite large projects) will immediately turn away from any CMS which is not capable of pure tabled layout instead of CSS by choice. For such projects you use no or as little CSS as you can manage, and you go for ultra-lean design and lowest possible bandwidth.

    It would be nice to use many of the OSS CMS for this, but very often I turn to commercial software, because they cater to the customer instead of geek dreams. And geek dreams this question – still – is and will be for at least another decade or even longer.

    Sorry to burst that bubble, but I truly can’t listen to this “CSS is the way to go”-stuff without correct restrictions anymore.

    Greetings

    LHK

    Thread Starter semazen

    (@semazen)

    Thanks guys. Appreciate the link to Theme Developmment, and the advice on CSS. However, we already have a web site with its own layout/design, and so we want to include/run the script inside the current layout.

    We could re-invent the wheel as it were and try and re-build the site design all over again using the WordPress template system, or preferably, (if possible) strip WordPress of it’s skin and encase it in our current design, possibly via global header and footer php pages.

    Given that all we’re after is the ability to publish archiveable news with no other features, do you think this is possible, or one for the a too hard basket?

    Thanks again

    niziol

    (@niziol)

    I won’t waste my time responding to the egregious posting about CSS, using terms like “second and third world” and phrases like “these people..” is disgusting, it’s especially elitist and is very repressive in it’s nature.

    It certainly is possible, but from reading about other users attempts, it can be very difficult. I’m sure if you designed a plain template, just display the information you’d like and then just include the final outputted product into your site, that may work or you could do something with RSS as well. I’m sure there are better solutions out there, but I just don’t know what they are!

    Sorry I can’t be of more help, hopefully someone else can.

    Good luck,
    Michael.

    lhk

    (@lhk)

    Hi Niziol,

    just which personal pronoun would you prefer to specify that? Are we already as far with political correct-ass-ness, as reiteration of nouns is needed to evade nonsensical criticism?

    I deal daily with “these people”, and never noticed that they’d prefer an americanized pc denomination of the bald fact, that they *are* second and third world, entirely due political behaviour and exploitation of neoliberal capitalist states (including by the way Canada). What would you have them and me call them? “Economically challenged countries”? Or is “countries under permanent financial strain” better?

    They (and I) prefer to name things by bald reality, so please go and shove your political correct-ass-ness at someone else.

    *shaking my head*

    LHK

    Thread Starter semazen

    (@semazen)

    Can anyone actually help with the question please. I need to decide if we can use WordPress or if it’s too hard to incorporate into an existing site.

    Thanks

    vkaryl

    (@vkaryl)

    semazen: please see The_Loop. This would be the starting point for using the posting and display capabilities within an existing site.

    As far as within a table, I’m not sure why it wouldn’t work just fine within a table. The key is using a php extension, which you are doing. Your own header and footer should be possible as well.

    Thread Starter semazen

    (@semazen)

    Thanks vkaryl. We tried adding the code above, and just now similar code from the first example The Loop tutorial link you kindly provided.

    Unfortunately this did not work, because the right hand navigation bar did not appear, and clicking any links on the page, reverts the next page to the script’s original layout!

    Do you know how we can one add a header and footer (like most other scripts) to integrate WordPress into our layout?

    Thanks

    lhk

    (@lhk)

    Hi Semazen,

    you might try placing both main content as well as sidebar in the same table cell. A possible alternative might be calling WP inside an iframe (never tried that though).

    If it still won’t work…

    One of the smaller CMS (with a normal news function usable for blogging) which has no problems being called by tags inside pure table layout is WebsiteBaker (tried it myself, works like a charm, even if you strew the tags into different cells across the table), or Joomla/Mambo, which can also be used for blogging. You might try Sapid (blogging software), I think I saw at least once a tabled layout for this one and Serendipity (also blogging software) which I believe has a special config setting for the blog to be called inside a tabled layout.

    Any which way, with WebsiteBaker I’m certain, one of the abovementioned sites for a usergroup with low bandwidth and no CSS capabilities is maintained by a tabled Websitebaker and runs without trouble. It’s definitely lean enough to be used for easy blogging.

    Greetings

    LHK

    Thread Starter semazen

    (@semazen)

    Thanks LHK et al.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Running entire script within a table’ is closed to new replies.