Forum Replies Created

Viewing 15 replies - 46 through 60 (of 62 total)
  • Thread Starter kjgbriggs

    (@kjgbriggs)

    http://labyrith.co.uk/games/the-configuration/

    In the text, there should be no spaces at all in the paragraphs, neither column started off with empty lines in but every time I press Update to add to the page, the editor adds lines, then if I click Update again, it adds those lines to the page.

    I have tried this on new pages and old ones, it happens on all new pages I create but doesn’t happen on old ones (before the WP update).

    Thread Starter kjgbriggs

    (@kjgbriggs)

    I have already looked through the WordPress plugin API, I am usually quite good at programming and picking things up but this just seems so thrown together to me, the API is not very well structured in comparison to things like Microsoft .Net or even UnityScript.

    Nothing I have tried since the posted code works and I am at a loss with this.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    As I said, I am very new to this, this is my first plugin, and I have been at college 3d modelling all day so I have not had a chance to work on it, I just got back.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    I now have this but it is still doing absolutely nothing (and the if statement is printed as text).
    Ill check back tomorrow evening.

    <?php
    /*
     Plugin Name: Redirect To Page
     Description: A simple plugin for redirecting non-admins to a specific page.
     Version: 1.0
     */
    
    add_action('admin_menu', 'rtp_plugin_settings');
    
    function rtp_plugin_settings() {
    
        add_menu_page('Redirect Settings', 'Redirect Settings', 'administrator', 'rtp_settings', 'rtp_display_settings');
    
    }
    
    function rtp_display_settings() {
        $pageurl = (get_option('rtp_pageurl') != '') ? get_option('rtp_pageurl') : 'http://www.example.com/';
    
        $enableredirect  = (get_option('rtp_enabled') == 'enabled') ? 'checked' : '' ;
    
        $html = '</pre>
    <div class="wrap"><form action="options.php" method="post" name="options">
    <h2>Redirect Settings</h2>
    ' . wp_nonce_field('update-options') . '
    <table class="form-table" width="100%" cellpadding="10">
    <tbody>
    <tr>
    <td scope="row" align="left">
     <label>Enable Redirect</label>
     <label> </label>
     <input type="checkbox" name="rtp_enabled" value="enabled" /></td>
    </tr>
    <tr>
    <td scope="row" align="left">
     <label>Page URL</label>
     <label> </label>
     <input type="text" name="rtp_pageurl" value="' . $pageurl . '" />
    </td>
    </tr>
    </tbody>
    </table>
     <input type="hidden" name="action" value="update" />
    
     <input type="hidden" name="page_options" value="enableredirect, rtp_pageurl" />
    
     <input type="submit" name="Submit" value="Update" /></form></div>
    
    if (!is_super_admin())
    {
    redirect_user();
    }
    <pre>
    ';
    
        echo $html;
    
    }
    
    function redirect_user()
    {
     wp_redirect(home_url().rtp_pageurl);
     exit;
    }
    Thread Starter kjgbriggs

    (@kjgbriggs)

    Bump

    Thread Starter kjgbriggs

    (@kjgbriggs)

    Looked into this for about an hour and so far I have this:

    <?php
    /**
     * Plugin Name: Redirect To Page
     * Description: A simple plugin for redirecting non-admins to a specific page.
     */
    
    add_action('admin_menu', 'rtp_plugin_settings');
    
    function rtp_plugin_settings() {
    
        add_menu_page('Redirect Settings', 'Redirect Settings', 'administrator', 'rtp_settings', 'rtp_display_settings');
    
    }
    
    function rtp_display_settings() {
        $pageurl = (get_option('rtp_pageurl') != '') ? get_option('rtp_pageurl') : '2000';
    
        $enableredirect  = (get_option('rtp_enabled') == 'enabled') ? 'checked' : '' ;
    
        $html = '</pre>
    <div class="wrap"><form action="options.php" method="post" name="options">
    <h2>Redirect Settings</h2>
    ' . wp_nonce_field('update-options') . '
    <table class="form-table" width="100%" cellpadding="10">
    <tbody>
    <tr>
    <td scope="row" align="left">
     <label>Enable Redirect</label>
     <label> </label>
     <input type="checkbox" name="rtp_enabled" value="enabled" /></td>
    </tr>
    <tr>
    <td scope="row" align="left">
     <label>Page URL</label>
     <label> </label>
     <input type="text" name="rtp_pageurl" value="' . $pageurl . '" />
    </td>
    </tr>
    </tbody>
    </table>
     <input type="hidden" name="action" value="update" />
    
     <input type="hidden" name="page_options" value="enableredirect, rtp_pageurl" />
    
     <input type="submit" name="Submit" value="Update" /></form></div>
    <pre>
    ';
    
        echo $html;
    
    }

    My main issue now is that I cannot seem to get another function added without an error and the plugin going inactive.
    Would you know how to finish this (or add the function)?

    P.S: Try to bare with me, I am more than fluent in Javascript, UnityScript and quickly learning C#, but this is my absolute first time with php, and making WordPress plugins so try to bare that in mind if my code is complete gibberish.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    I have looked at many of these but they provide custom styling, I prefer to build my pages using the WP page editor, I am using the Divi theme which has a very powerful page editor and would prefer to have my maintenance page powered with that, rather than the actual plugin because I have more customizability and can put more stuff on it(and have better formatting).

    Thread Starter kjgbriggs

    (@kjgbriggs)

    I am using a plugin called Paid Memberships Pro to handle the monthly membership payments through PayPal (I use it on one of my other sites).
    I have contacted their support about doing this but have heard nothing back yet.

    This is not something I need to get done straight away, but soon.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    As stated above, the host set my maximum upload size to 100MB after I asked them, so I should be able to upload files below this…in a perfect world.

    I have tried using Add From Server before, it never worked properly for me, I am trying to upload a demo for a product I have been working on and I really need to get it up there.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    In Dashboard>Settings>Media there is nothing displaying any paths, only different image sizes, and a tick-box for organising, I have disabled all plugins again, but still get the error, I am starting to think this maybe a problem with WordPress itself when uploading large file sizes.
    I have changed the permissions via FileZilla to all mentioned, no fix yet.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    1and1 do not give customers access to the error logs unfortunately, I have asked before when problems have occurred with other things.

    I have had the same problem since this morning (possibly longer), this is the first time I had tried to upload anything this size before but my upload limit is at 100mb, well over the 78mb file (don’t judge).
    This is something I REALLY need to get fixed, the file I am trying to upload is a demo for a product I am working on at the moment, a lot of people wanted a demo but I find out today after making one that I can infact not even upload the damn thing, again this seems to be the HTTP error caused by large file sizes, I have deactivated all plugins and even tried it on my other site, same thing.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    My host does not generally release error logs to people, I have asked for error logs on an Asp.NET site before and they would not release them.

    Do you have any ideas about this? its not like I don’t have the hosting power, I think my package is either 2gb or 4gb memory allocated.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    1and1 do support subdomains, but the support staff had a bit of trouble understanding my query I think, I think they thought I was asking about installing WordPress on a subdomain created in the 1and1 control panel, not in WordPress itself, and no-one else seems to know whether 1and1 support externally created subdomains, like those made by WordPress’ multisite feature.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    the latest one this occurred with doesnt even have any plugins, and the only thing in common with 2 of them is WooCommerce, but like i said, the new site I set up to test it doesn’t have anything on it at all, its literally a brand new installation off of WordPress.org.

Viewing 15 replies - 46 through 60 (of 62 total)