[Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

Results 1 to 8 of 8
  1. #1
    1 + 3 + 3 = 7 EvilCoder is offline
    MemberRank
    Jul 2009 Join Date
    /home/mvdworpLocation
    334Posts

    [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    Hi all,

    I was bored so created a little script for UberCMS. If you know what you are doing you could make this compitable with another CMS.

    Code:
    <?php
            @require("../global.php") or die("ERROR. Could not establish link to global.php!");
    
            $tmp = dbquery("SELECT * FROM external_texts");
    
            while($row = mysql_fetch_object($tmp))
            {
                    echo $row->skey . "=" . $row->sval."\n";
            }
    ?>
    What you need to do is simple. Create a file "additional_texts.php".. Make sure it's php!
    And add this to your client.php "BELOW" "external.texts.txt" :

    Code:
    "external.override.texts.txt" : "linktophpfileabove.php?hash=<?php echo rand(0,99); ?>",
    Make sure the php file above has access to your database.
    The hash= future is for the cache. Suggest that you leave it there.

    MySQL codes;
    Code:
    CREATE TABLE IF NOT EXISTS `external_texts` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `skey` text NOT NULL,
      `sval` text NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

    Explination about the script;

    When you have a housekeeping. You can go to there and add some text for badges etc. To set this up you probably need to have some skills. However its worth a try.

    This is another step to lazyness.

    Kind regards,,


  2. #2
    No, Just no. Matthew is offline
    MemberRank
    Jul 2008 Join Date
    United KingdomLocation
    1,408Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    Why are you not caching the texts ? seems pointless to re-query for something that doesn't change regularly.

  3. #3
    Account Upgraded | Title Enabled! Chapo is offline
    MemberRank
    Jul 2010 Join Date
    United StatesLocation
    944Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    Quote Originally Posted by Matthew View Post
    Why are you not caching the texts ? seems pointless to re-query for something that doesn't change regularly.
    Actually, you are right, and i don't see the point of this.

  4. #4
    Account Upgraded | Title Enabled! flx5 is offline
    MemberRank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    As far as I know this would create the same query twice in UberCMS.
    UberCMS once does this in the externals.php and appends it to the original external_flash_texts.
    Therefore if you want to override the Externals only, you sould remove the Query from the externals.php.

  5. #5
    1 + 3 + 3 = 7 EvilCoder is offline
    MemberRank
    Jul 2009 Join Date
    /home/mvdworpLocation
    334Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    You could of appriciate the work that is being done... by saying "Thanks!"... Everyone wants to create something unique. Again this is the last time I release something in this section as i only get comments that it aint good. Or that its pointless to add.. No I know why alot of developers are not sharing their work any longer.. Because of the flamers... Did I ask you guys to add it? Im sorry for this reaction but.... Im releasing something to share.. Not to get raped in my own thread for something I created and I released... Please stop these negative reactions and be a bit more thankfull that "WE" those are always doing something wrong or get flamed.. Keep this section "Alive".....

    On topic:
    Thanks for the Like's and reactions...

    Thanks. That was all...

    Quote Originally Posted by Niels View Post
    Actually, you are right, and i don't see the point of this.
    The point is just to let staffs also change the badge name's and desc's trough Housekeeping.
    That is the end point. You will have to create the HK page yourselfs. As i don't have the time to do that.

    Quote Originally Posted by Matthew View Post
    Why are you not caching the texts ? seems pointless to re-query for something that doesn't change regularly.
    Uhm.. But.. When you cache, (Google chrome's a b!tch).. The files won't get updated.. Maybe after an hour. The point of these external_override's is that it works right away when you add this to your database. I know what you mean by pointless re-query everytime. But yeh,, it saves you alot of time to refresh or clear cache etc. Thanks anyway for the (1st) reaction.
    Last edited by EvilCoder; 13-12-12 at 01:47 AM.

  6. #6
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    I think that this could be useful but maybe instead of using the database you could store them in a file. When you make changes through the housekeeping you could simply recreate the file.

  7. #7
    1 + 3 + 3 = 7 EvilCoder is offline
    MemberRank
    Jul 2009 Join Date
    /home/mvdworpLocation
    334Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    Quote Originally Posted by leenster View Post
    I think that this could be useful but maybe instead of using the database you could store them in a file. When you make changes through the housekeeping you could simply recreate the file.
    Yea that could be done easy. However, i don't think I have the time to code a whole page/housekeeping.
    As my work goes first. I got like an hour a day for myself. The rest is all work work work, sleep. And over again.

    --
    If you thinking about creating such thing, i can give you a hand in PHP/HTML/C# or anything you preffer.

    Quote Originally Posted by flx5 View Post
    As far as I know this would create the same query twice in UberCMS.
    UberCMS once does this in the externals.php and appends it to the original external_flash_texts.
    Therefore if you want to override the Externals only, you sould remove the Query from the externals.php.
    I've never seen something like this at the UberCMS basic. My code structure is a bit diffrent from this. But I released this for "External_override_texts".

    -Peace.

  8. #8
    Account Upgraded | Title Enabled! flx5 is offline
    MemberRank
    Nov 2009 Join Date
    GMT+1Location
    294Posts

    Re: [Release][PHP-Override-Texts] additional.php [Recommended for UberCMS]

    Perhaps I've got another version than you, so sorry if I was wrong.
    About the topic of caching:
    If something was changed, then you will have to force the reload.
    If nothing was changed, you just can keep the parameter.
    But from this a result would be another SQL Query more...
    => UberCMS needs a internal cachnig system, wich does not only work with sessions.



Advertisement