What's new

Code Question

Data Glasses

Top Contributor
Gold Nugget recently informed me that www.speculate.tv has some code showing at the footer area and offered a little advice on how to fix it (thanks')

"I had a look at the code from the page (IE View Source) and it appears almost as though that section of code is left over from some other/past project.

No expert...but looking (using the view source code) I think lines 489 to maybe 509 could probably be deleted...they look like direct text inserts (which is why they show up)....copy the page text (rename it, save as html) onto your desktop, get rid of the lines I mentioned and see what happens...if all is okay, change it in the master (hosted) page
"

That reads fine to me and i do understand i need to copy the code then delete unwanted sections of code, my problem is that i can make my way to the public files but cant find the code , should i be looking in html/speculate.tv/wp-content/themes/World_Green_ad/home1 but once i get to this theme i get a little lost, so i am currently looking in different headings and opening the code edit but alas it is not getting me anywhere so may be easier to ask exactly where to go to find this rogue code.

I need the destination , themes, function, content ?? then i can have a go

Many thanks in advance for this, i can see in the page source view the lines referred to but cant find them when looking at the codes in files ......cant find correct file
 

Data Glasses

Top Contributor
Wow how dumb ........i cant edit the first post ..............wtf

Ok i was going to ad that i am looking at the files via hosting and not the website editor

..thanks
 

goldnugget

Top Contributor
I think you can only edit posts on the forum within a set timeframe then it locks.

I dont know about WP, but most WYSIWYG programs will set a default web homepage of something like 'Index.html'...as to where in your file structure it is a hard one. I used to have a webedit program that kept on defering to a stored backup somewhere when ever I made direct changes to code. What I found was there were duplicate sets of files, one in the public folder and the other in the folder of the actual website folder and only one of them would actually take the changes.

Like I said, not sure of your set up so wont be able to help further (are you able to do a search all your folders for that web host for index.htmls?...may be able to snag it that way).

Someone mentioned once in one of my threads 'We dont use DOS anymore, time to get with the times...why bother with code?'...this is just one reason ;)

Hope someone can help you with it and get it sorted.

Oh and when you find out where it is, open it in Notepad to view the code and make changes (save as new name onto your desktop as html to see if changes work before saving changes to the master).

Good luck

Jay
 

smee

Top Contributor
For WP, if it's on the home page, it will likely be the index.php or footer.php file.
 

Data Glasses

Top Contributor
For WP, if it's on the home page, it will likely be the index.php or footer.php file.

When you look at the source code it is below what appears to be the footer, so i did not consider looking there.


Warning: simplexml_load_file() [function.simplexml-load-file]: </item> in /home/sexydate/public_html/speculate.tv/wp-content/themes/World_Green_ad/home1.php(2) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 2

I am able to find this destination in the public files at my hosting but there is only 3 lines so that's where i hit the dead end ??

I am starting to think of trying to find it via the website then copying it all and deleting the lines gold nugget mentioned

So basically i need to find where the lines are to be deleted >>//??
 

Data Glasses

Top Contributor
The error message stays the problem is on line 2 in home1.php so having only 3 lines of code does not mean the error is not there....

If line 2 of home1.php contains something like

simplexml_load_file(...http://johnloss.info/OnlyHomeFooter/home.xml ...)

then you are in the right place...

No there is just a bunch of gobbldygook mixture of numbers and letters, at a time when i am trying to establish if my car has a cracked head i decided to just change themes, this is not a preference at the moment so it's all good and a big thanks to all who offered advice .......cheers !
 

goldnugget

Top Contributor
Spacey, if you can open your notepad, open ...... change.txt to all files in the pop up box, go look for your home page then load that up in notebook.

Save As....spacey (or whatever).html onto your desktop. Delete the lines I mentioned, save, and then close it and click on the saved html page on your desktop, you will notice that all that code is now gone below 'designed by' and it looks all good.

If you are happy with this then go back into notepad, go into your host page (again switching the box from .txt to all files), load up your hosted page and delete the same lines.....save (keep original location....your host server), and it should be changed.

DISCLAIMER: I tried this on my own desktop (hope you dont mind me trying to find a solution) and it worked...the final few lines in the page code are as follows (for your reference):

<p class="art-page-footer">Design By <br />

</div>
<div id="wp-footer">
<script type='text/javascript' src='http://platform.twitter.com/widgets.js?ver=8482'></script>
<script type='text/javascript' src='http://apis.google.com/js/plusone.js?ver=8482'></script>
<script type='text/javascript' src='http://platform.linkedin.com/in.js?ver=8482'></script>
<!-- 30 queries. 1.415 seconds. -->
</div>
</body>
</html>

Only those lines menbtioned earlier (I think) were deleted, nothing else changed.

Hope this helps. PM me if you think I can help you further.

Jay
 

Data Glasses

Top Contributor
Thanks jay , i should have tried what you suggested but i had already changed themes and are now working on the next item on the list .......broken car, how do i change themes for that one ?? Compression test tomorrow morning will disclose if i have a cracked head ......(in my engine) thanks again
 

goldnugget

Top Contributor
Thats cool...I like the new look...very smart ;)

As far as the car goes....I'm in a similar situation (3.0 1991 Pajero) but just nursing it until I figure out whether to fix or replace...time will tell.:confused:

Jay
 

theseoconsultant

Top Contributor
Thats cool...I like the new look...very smart ;)

As far as the car goes....I'm in a similar situation (3.0 1991 Pajero) but just nursing it until I figure out whether to fix or replace...time will tell.:confused:

Jay

Funny that; I'm in the same position with my '93 Pajero; but I think it's just time to upgrade to a new Patrol. ;)
 

Data Glasses

Top Contributor
Well it seems it may just be a thermostat that has stopped working which is why i am using water, it backs up out the radiator cap ...........going back to the garage to find out in a few hours (fingers crossed) Cars are machines and need maintenance although i still prefer something older and better built than a newy. i really dig seeing this old two door valliant pacer coupe around the corner most days
 

goldnugget

Top Contributor
I love the old Hemi's myself...I parted with an old VJ years ago now...still miss it, so easy to work on and a boot big enough to fit at least 3 adult bodies :cool:. I actually drove that one with a blown head from Central Vic to Brissy and back towing a trailer...hard to kill em engine wise.

Fingers crossed for you.

Jay

Actually if I kept all the 'crappy' cars I sold over the years (primarily escorts and Valiants which I used to fix up and sell on), I'd have enough cash now to just about buy a house.....reminds me of the dog domains thread....
 

Data Glasses

Top Contributor
the old pacer coupes are hard to find because many were chopped back in the 80's to make convertables so there are not many hardtops left, the one around the corner is painted simular orange to 'General Lee' from the dukes of hazard .........yeehaaaw

sadly my car is an 86 hiace van, at least it's auto
 

Community sponsors

Domain Parking Manager

AddMe Reputation Management

Digital Marketing Experts

Catch Expired Domains

Web Hosting

Members online

Forum statistics

Threads
11,100
Messages
92,051
Members
2,394
Latest member
Spacemo
Top