CakePHP displaying "admi" at the top of any page - cakephp

I'm trying to deal with some strange CakePHP behaviour. I enabled "admin" prefix in core.php and now I have "admi" at the top of any page...
admi<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Literally out of nowhere, no trace of it in layout # default.ctp.
Looks like some CakePHP bug, any ideas would be appreciated.
Running on localhost, Apache 2.2.17, PHP 5.3.5, MySQL 5.1.63, Cake 2.o

Found it, "admi" was at the beginning of core.php, I probably added it accidentally when I was changing "admin prefix" there.

Related

Tronlink integration

According to this site:
https://developers.tron.network/docs/tronlink-integration
I am suppose to be able to connect ANY website to TronWeb, following this code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<button onclick="gettronweb()">Can you get tronweb from tronlink?</button>
<script>
function gettronweb(){
if(window.tronWeb && window.tronWeb.defaultAddress.base58){
document.write("Yes, catch it:",window.tronWeb.defaultAddress.base58)
}
}
</script>
</body>
</html>
This however does not work when I try to do it, could somebody explain to why?
I have tronlink (Chrome extension) installed, and it works on all other sites, so that's not the issue.
Or am I missing something?
you need to install tronweb and use the methods provided . that example is kind of just like a skeleton to show you how it would be called . but there needs to be more then just that file.
im newer then you most likely at coding lol so i am probably wrong just giving my 2cents
It might seem that Tronlink requires a SSL server before running....
Works on a SSL certified server....
Tron Development seems tricky somehow for new users with lack of proper documentation.
Unlike Web3/Metamask which can work on localhost itself for checking and development tron seems to not work with "insecure" network/server.
You need a SSL certified server in-order to run it properly (yes its strange might be for some security ! who knows).
What i did while testing is created a JS file where i've written all tronlink (TronWeb Extension) related code and used "index.html" file to interact with it (For some reason !)
Now what I did was hosted this index.html file along with my JS code for tronlink interaction to Github Pages ! Yes for free + you get Github's SSL pre installed server and that's enough for your program to run and test.
Note: Github pages needs your repository to be kept public inorder to host it. (Not preferred for private projects)
You can also host it in your personal AWS with SSL certificate or any other Servers with SSL certificate.
Hope this helps all with this same issue !

data-role="form" gives error in W3C Validator

A friend of mine has a website with this doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
I know it is an old doctype.
The problem is, that on the contact page it gives a Data-Role error in the W3C Validator.
The contact form is from 123contactform. I already contacted them, but they only come up with the solution to change the doctype.
For now I don't want to do that, because then I get a lot of other errors, that I have to fix.
How can I change the Data-Role error? Here is the error in the W3C Validator: https://validator.w3.org/check?uri=http%3A%2F%2Fwww.maryderekboedelopruiming.nl%2Fcontact.htm&charset=%28detect+automatically%29&doctype=Inline&group=0
I decided to change the doctyp. All is well now.

Change charset from utf-8

I recently started to learn Angularjs 2, I don't have much experience in Angular 1 and I'm following their docs.
I need to write in brazilian portuguese and I usually insert a charset of iso-8859-1 in my HTML's head. When I used my html in Angular structure the charset wasn't recognised anymore.
This is the example that I'm using to test. When I use this html in the Angular template or its main index the charset is not recognised.
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="iso-8859-1">
<title>João Paulo's site</title>
</head>
<body>
<h1>João Paulo</h1>
<h2>áéíóú ÁÉÍÓÚ çõ</h2>
</body>
</html>
The problem is solved despite I'm not sure why. As my page was evolving I started to load the page's content by a external json file.
I'm still confused about utf-8 and iso-8859-1, but what solved the problem was to let the html page charset as utf-8 and I had to save the json file as iso-8859-1.

The project is not configured for Facelets yet in RAD 8.0

I am trying to create JSF 2 pages. When I create pages using facelets template I get message on top that "The project is not configured for Facelets yet.
You need to add a Facelets runtime to the project's classpath".
I created file called Test1.xhtml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11 /DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com /jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com /jsf/html">
<h:head>
<title>Test1</title>
<meta http-equiv="Content-Type"
content="application/xhtml+xml; charset=UTF-8" />
<meta name="GENERATOR"
content="Rational® Application Developer for WebSphere® Software" />
</h:head>
<h:body>
Test
</h:body>
</html>
When I run this I see same content of file in explorer, instead of Test.
Also Page code is not created for it.
Page code and required web.xml/facesconfig stuf is created when you drop first component on the page.
Check this: http://www-01.ibm.com/support/docview.wss?uid=swg21503733

recaptcha not showing in ie7

I'm not getting recaptcha to show in IE 7 . I've looked into several things on the page and nothing seems to make a difference. Following is page is the one with the issues, if anybody wants to check it out that would be awesome.
http://www.nolimitwheels.com/testRedirect.php
The main problem is the headers because with the w3 some of the code doesn't pass the revision.
You should try these headers:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Resources