TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 73
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 64
  • Total: 64

A way to insert html as code on a article in Tiny portal ?

Started by deef, February 02, 2007, 12:22:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

deef

I wish to add on a article in tp some html code ... with not can be parsed ...

In a article I wish to promote a banner...

For example

<<Banner preview with htmlcode>>
Banner desciption:  Flashing banner
Banner dimensions: 250 x60
Banner code:
And here is the problem....

How to display simple html without it's beïng parsed ?

In the forum there is a tag [blabla_CODE] but this is not working in the article manager ?  Why is it missing there ?

grtz,

deef

bloc

I am not sure I follow but..if you turn off the WYSWYG editor, you can write pure HTML codes. Is that what you mean?

deef

Quote from: Bloc on February 02, 2007, 12:26:17 PM
I am not sure I follow but..if you turn off the WYSWYG editor, you can write pure HTML codes. Is that what you mean?

No ... lol I write it always in html.

But the problem is ....

Visitor of my site you can use this code:
<a href="http://www.myurl.com" target="blank">A link to my site</a>
yust copy & paste this code

in the forum it works like that way... but in the article manager you will see:

Visitor of my site you can use this code:
<a href="http://www.myurl.com" target="blank">A link to my site</a>
yust copy & paste this code

That's beacause the code tag there don't work

grtz,

deef


bloc

oh, I see. :) Yes, thats correct..the code tag or any BBC tag doesn't work in HTML articles, it would make it impossible to write advanced HTML, since the BBC parser throw out anything it can't understand. :) Whats needed is a BBC type of article, coming up in future versions of TP.

How about trying the HTML codes for the same?
<pre><a href="http://www.myurl.com" target="blank">A link to my site</a></pre>

Does that work..?

...You can always replace < with the entity one..but its cumbersome. 

deef

Nope don't work...  I have already try'd to make a textfield but that's not working also:
He translate the urls to
Quote
_fcksavedurl='http://www.mysite.com'

It's realy strange....  But do you have a alternative way to show the html code to my users ?

I wish to make simple a article to my users...
Quote
If you wish to link to us use this code
Code plain HTML
For example code 1 plain html

Code Banner 1
For example code banner 1

Code Banner 2
For example code banner 2

So that the users who have sites can link to our site (link building).

grtx,

deef


akulion

open the index.template.php of your themes

add this before </head>


<style>
.highlighttext{
background-color:yellow;
font-weight:bold;
}
</style>

<script language="Javascript">
<!--

/*
Select and Copy form element script- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

//specify whether contents should be auto copied to clipboard (memory)
//Applies only to IE 4+
//0=no, 1=yes
var copytoclip=1

function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
if (document.all&&copytoclip==1){
therange=tempval.createTextRange()
therange.execCommand("Copy")
window.status="Contents highlighted and copied to clipboard!"
setTimeout("window.status=''",1800)
}
}
//-->
</script>


then create a SCRIPT BLOCK and add this to it


<form name="test">
<a class="highlighttext" href="javascript:HighlightAll('test.select1')">Select All</a><br>
<textarea name="select1" rows=10 cols=35 >This is some text. This is some text. This is some text. This is some text.</textarea>
</form>

Replace This is some text. This is some text. This is some text. This is some text. with ur code


the above will work in a block, but in article you will just have to try it our

original reference to script: http://dynamicdrive.com/dynamicindex11/selectform.htm

bloc

I searched and found that <code > is supposed to show html codes..but I haven't tried it more, as it failed in the first attempt. :P

rebelrose

I just created an article, not a php article, and used the code that Bloc has posted above and it shows correctly.

code I used



<pre><a href="http://www.myurl.com" target="blank">A link to my site</a></pre>



what shows is "A link to my site" (it is a hyper link as it should be)

What is the problem your having, maybe I am not understanding what is wrong ???

TestMonkey

#9
I believe he is wanting to be able to post a article that allows his users/members to copy/paste links // banners and such. To allow them to have links to his site on their site, they need to be shown the html to copy & paste..

Most sites use a textarea form for this type of thing:

<form>
<textarea name="site links" COLS=40 ROWS=6>
Copy and Paste the code below to link to MySite:
<a href="index.html" title="Mysitelink!">Link to my site!</a>
</textarea>
</form>


But as others have said you can play with:

<pre><a href="index.html" title="Mysitelink!">Link to my site!</a></pre>

and also

<code><a href="index.html" title="Mysitelink!">Link to my site!</a></code>

This website is proudly hosted on Crocweb Cloud Website Hosting.