Forums

Godaddy free hosting - Dashboard / Admin broken (102 posts)

  1. icurnvs
    Member
    Posted 2 years ago #

    Hi all,

    This is quite far from a sexy fix for the broken RSS feed, but here is how I accomplished it:

    I installed the plugin Static Feed/, and set the static feeds to rss2.xml, rdf.xml, rss.xml, and atom.xml

    Then edited /wp-content/plugins/staticfeed/staticfeed.php inserted the following code at the beginning of the staticfeed_save_feed_content function at line 1278:

    $content = ltrim($content);
    $content = rtrim($content);
    $content = rtrim($content,"<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>");
    $content = rtrim($content);
    $content = rtrim($content,"</iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->");

    I pointed my feedburner to the static xml link and it seems to work fine now, hope it works for you as well.

  2. Bradsl
    Member
    Posted 2 years ago #

    @icurnvs, I tried the above, but still getting:

    </iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
    <script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>

    At the end of my RSS feed file.

    :(

  3. icurnvs
    Member
    Posted 2 years ago #

    Did you try deleting the RSS xml feed file and having the plug-in recreate it? Publishing a post might accomplish the recreation as well.

    You may also have slightly different garbage injected by godaddy at the bottom of your xml feed file, so you may need to customize the code above for your file.

  4. Bradsl
    Member
    Posted 2 years ago #

    @icurnvs, I'm thinking the problem may be with how I'm attempting to insert the code above. Can you show me the lines before and after that slug of code above so I can make sure? I'm most likely not doing it correctly.

  5. icurnvs
    Member
    Posted 2 years ago #

    Here are lines 1275 to 1308 of my staticfeed.php file.

    function staticfeed_save_feed_content($local_file, $content)
    
    {
    	$content = ltrim($content);
    	$content = rtrim($content);
    	$content = rtrim($content,"<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>");
    	$content = rtrim($content);
    	$content = rtrim($content,"</iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->");
    
    	if( !file_exists($local_file) )
    
    	{
    
    		if( !@touch($local_file) )
    
    			return array('success'=>false, 'message'=>__('Unable to create file.') );
    
    		chmod($local_file, 0666);
    
    	}
    
    	if( !is_writable($local_file) )
    
    		return array('success'=>false, 'message'=>__('Unable to write to file.') );
    
    	$fp = fopen($local_file, 'w');
    
    	if( $fp === false )
    
    		return array('success'=>false, 'message'=>__('Unable to open to file.') );
  6. Bradsl
    Member
    Posted 2 years ago #

    @icurnvs, I did do it right (and thanks for all the extra hand holding!) but it's still not working. Dang thing is still inserting at the bottom:

    </iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
    <script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>

    Sigh....

  7. Bradsl
    Member
    Posted 2 years ago #

    @icurnvs, one more thing I need to clarify, is that the rss2.xml file is being generated correctly - your code is working perfectly. The GoDaddy code is being added when the file is being served via http.

  8. icurnvs
    Member
    Posted 2 years ago #

    The idea behind making the file an xml file is that godaddy does not (as I understand it) inject its junk into xml files. I'm guessing that something else is at play here.

    I'd try turning off all your other plugins and recreating the xml files.

    Maybe its in the static feed settings, I have all the feed boxes checked and used the example URL and Local File Paths for each. Then
    under additional settings I have the Permalinks checkbox unchecked and the Manually update .htaccess unchecked.

    Also, I doubt it'll help anything, but I put a .htaccess file in my blogs top level directory.

    Hope this helps.

  9. Bradsl
    Member
    Posted 2 years ago #

    @icurnvs

    HA! Unchecking Permalinks was the key. It seems to work great now & passes the feed validation.

    Thanks SO much!

  10. masakia
    Member
    Posted 2 years ago #

    Hi, I thought i just share the alternative way of removing godaddy banner.

    I only do this to my admin page and login page. I leave banner on the front pages.

    <script language="hahahahaha"

    Add this line to the very end of 'wp-admin/admin-footer.php'. No closing brakcet. "hahahahaha" part can be of any text. The original one I saw used "jawascript" (not Javascript) This will kill the banner from the admin pages. This solution relys on the fact that godaddy add the <script>...</script> pair at the end of html pages to load the banner. Adding the code above will trck the browser to think the script code will start right their so the browser try to execute the entire string of text that follows as a script based on language "hahahahaha." Since the browser does not know such a script language, it wll never get executed. On the other hand, the solution proposed previously in this thread uses CSS to 'hide' the banner that is actually their as a result of godaddy's script already ran, so the approach is fundamentally different but end results are the same.

    to remove banner from login page, add the same line to the very end of 'wp-login.php' file.

    I suppose adding the same line to the end of "footer.php" from themes folder will remove the banner from the reader pages but I have not tried that.

  11. 4Site
    Member
    Posted 2 years ago #

    Hey i was wondering if anyone could help I edited my script loader php

    as per stefano.torricelli's instructions however i am not getting an error on my wordpress now that doesn't even show wordpress login it just gives the following error

    Parse error: syntax error, unexpected $end in /home/content/********/wp-includes/script-loader.php on line 754

    i noticed when i was editing the file script-loader.php in in wp-includes folder in my code editor that it gave an error
    purporturating to a syntax error in the last line at the end of the file

    was there a syntax error in stefano's code?

    thanks in advance for your helo

  12. 2012domain
    Member
    Posted 1 year ago #

    [moderated] Use a pastebin when posting numerous lines of code.

Topic Closed

This topic has been closed to new replies.

About this Topic