Jump to content

Recommended Posts

Posted

From the cpanel documentation:

This simple script allows you to insert random pieces of text into your web page. This is useful for daily quotes, helpful hints, or any other place where random text is useful.

 

To install the Random HTML script:

 

Click on the on the Random HTML link in the CGI Center area.

 

Enter each piece of random text in the box and make sure you put each piece of text on a new line. You can not include new paragraphs within the one piece of text, as the script will separate each new paragraph into a new piece of text.

 

Copy and paste the tag at the top of the page into your web page at the appropriate place.

 

Change your web page extension from .htm or .html to .shtml. This is the required file extension to use SSI (Server Side Includes).

 

Click on the Save button.

 

Upload the web page and test the script.

Posted

Good, I'll try it!

 

Now, if I want to change the list of text lines .. are they stashed where they would be editable ... or do you just repeat the process with your new list each time?

 

And are the text items text only (no html tags, etc.)? Thumbs Up

Posted (edited)

When you go back into cpanel the list is still there

and you can change them there.

 

 

edit.

I added an html image tag into the list of text quotes

and it worked!

Edited by TCH-Don
Posted

;)

 

OK,

 

I must be having a lapse of brain function ...

 

I haven't been able to make this work. Does the tag line have to reside within the html body? Does it have to be wrapped in something like img src ...

 

Do you paste it in literally like it is presented:

 

<!--#exec cmd="cgi-bin/randhtml.cgi"-->

 

or some "edited" version of the line?

 

Does the shtml file have to live in a particular folder ...

 

Duh?

Posted (edited)

I just inserted it as html

and it worked.

 

Put it where ever you want it displayed.

 

 

><H1>random html gen test</H1>
<P>
<!--#exec cmd="cgi-bin/randhtml.cgi"-->
</P>

 

 

 

edit

Ok I did put it in the root folder and it worked,

but not in a sub folder.

I will see what I can find out.

Edited by TCH-Don
Posted

OK .... saw your comment about the root dir ... let me know ... THANKS!

 

________

 

 

OK

 

It looks like I would want my shtml file in a folder containing a cgi-bin folder containing the randhtml.cgi file. Or am I making this too difficult?

 

If not where is the randhtml.cgi file created ... just copy the corresponding cgi-bin folder where I want it, or am I off in the weeds??

Posted

Well you can put the shtml file into the cgi-bin and run it

drop the cgibin/

 

<H1>random html gen test</H1>

<P>

<!--#exec cmd="randhtml.cgi"-->

</P>

 

I did try to put the cgi file in a subdomain cgi-bin and nothing.

Hope that helps.

 

I would look for php version.

Posted

I played with it a bit more ... never did get it to display a text line.

 

And if you move the .randhtml file, then when you go back to the Cpanel edit/control, it doesn't see what you had saved before, etc. and will just create another file in the root folder.

 

Oh, well ....

 

Thanks for your help!

 

Jeff

Posted

:dance:

 

Thanks for the referral to www.hotscripts.com, what a great resource!

 

I ended up at www.cgiscript.net and found a short Javascript piece that did the trick ... had it up and functioning in minutes. (Did I mention that there is another ton of stuff on this site!)

 

Also, for another blog, I wanted a Quote of the Day item ... not one that I populated, but that would draw from a QOTD site on the net. I found Best Quote of the Day at http://home.att.net/~quotations/. Another short Javascript piece that pulls up a daily quote. ... plug and play!

 

Jeff

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...