Jump to content

Images replacing Site Documents Names


Guest lordbarron

Recommended Posts

Guest lordbarron

I'm trying replace the title words on each site documents. And also the home page. In the admin your presented with "Document Name" - and a box [ ] to put the name of your title to display in the box. I want to put an image here instead. I tried <a href=" and <img scr=" but niether worked. any ideas? I also figured it might be php so i used ' instead of ". im stuck.. anywhere in the php I could go in and change them manually?

I'm trying replace the title words on each site documents. And also the home page. In the admin your presented with "Document Name" - and a box [ ] to put the name of your title to display in the box. I want to put an image here instead. I tried <a href=" and <img scr=" but niether worked. any ideas? I also figured it might be php so i used ' instead of ". im stuck.. anywhere in the php I could go in and change them manually?

Ok so I've got it to the point where it will display in the admin section of the site, but it only shows the code on my actual site. To clarify I want my links to remain text, and I only want the words in the actual page to turn into an image. It seems changing the name to a link in the admin section changes it in every location.

When you create these documents where does it store them? I've had a gander but can't find anything. thanks again

Link to comment
Share on other sites

When you create these documents where does it store them? I've had a gander but can't find anything. thanks again
The documents are stored in the database.

If you're adding HTML to the rich text editor, click on the source button first. This way the HTML code will not be altered. :)

Link to comment
Share on other sites

Guest lordbarron

yea i did try using the source button. but it doesn't show the title of the page in the source, there for i cant edit it.

Link to comment
Share on other sites

Guest alekk

You can modify "siteTemplates/Content/viewDoc.tpl" and delete "<sometag>{DOC_NAME}</sometag>" - and then manually insert proper image in admin (using <img src=).

Or - 1) assign a doc number for template

with css - 2) extend class for title with it 3) in CSS hide the text and show the background image.

without css - 2) instead {DOC_NAME} insert

<img src="path-to-images/doc_{DOC_NR}.gif" alt="{DOC_NAME}">

etc.

Link to comment
Share on other sites

Guest lordbarron

so would my path me be formed something like this

<img src=".../.../styleImages/doc_{DOC_NR}.jpg" alt="{DOC_NAME}"></span>

would I them have to name my files doc_1.jpg, doc_2.jpg etc?

thanks for the input maestro

Link to comment
Share on other sites

Guest lordbarron

Ok not having any luck here,

i've change the line in the viewDoc.tpl

<!-- BEGIN: view_doc -->

<div class="boxContent">

<img src=".../.../styleImages/doc_{DOC_NR}.jpg" alt="{DOC_NAME}">

<br />

{DOC_CONTENT}

</div>

<!-- END: view_doc -->




and i've set the the page title in admin to 



[code[<img src=".../.../styleImages/doc_{DOC_NR}.jpg" alt="{DOC_NAME}">

and im still just getting the txt appearing.

my path is relative, my folders are like so styleTemplate/content/viewDocs.tpl and images are in styleImage/doc_1.jpg so have i set the path correctly?

im also getting a msg in admin saying type="text" and maxlength="255"/>

is there anywhere,, i can extend the maxlength of that?

Link to comment
Share on other sites

Guest alekk

No, no, no <_<

1) Alter viewDoc.inc.php

add line

$view_doc->assign("DOC_NR", $_GET['docId']);


before


$view_doc->parse("view_doc");

2)

In title You write Your title - it is used also for <title> tag.

See source what it shows then.

Link to comment
Share on other sites

Guest lordbarron

Ok I really am confused now. I've change the php file and uploaded it. the .tpl has been change and I have added the link, isn't this over kill. im sligtly worried also that my link to the images are wrong,, can i use static links while i test it?

and where you said look at the source did u mean in the admin editor or from the brwoser page. this is was FF retrieved for the section of the page im working on

<div class="colMid">

	<div class="boxContent">



<img src="/skins/default_2/styleImages/doc_1.jpg" alt="test">

<br />

<font size="2"><span style="color: rgb(0, 0, 128);">Lord Barron Design &amp; Entertainment are a fresh and exciting company offering a whole host of products and services to the public and business alike.&nbsp; <br/>

At Lord Barron Apparel you are discovering a hedonistic, twist............................. the end...<br/>

<br/>

*certain rescrictions apply, see item description/terms &amp; conditions for more details.<br style="color: rgb(0, 0, 128);"/></span><br style="color: rgb(0, 0, 128);"/><span style="color: rgb(0, 0, 128);">Lord Barron Loves You</span><br style="color: rgb(0, 0, 128);"/></font>

<p style="color: rgb(0, 0, 128);"> </p>



<p style="color: rgb(0, 0, 128);"><font size="2">&copy; Lord Barron  2007. All rights reserved.</font></p>

<font size="2"><span class="navTitle" style="color: rgb(0, 0, 128);"> </span></font>

</div>

	</div>

if yousome could put this into a simple to follow set of instructions I would really appreciate that! many thanks Ty

Link to comment
Share on other sites

Guest alekk

<img src="/skins/default_2/styleImages/doc_1.jpg" alt="test">

If this is in source code - all works now. This is what You have instead of "title" - simple img tag. Just upload images in good location / change location in .tpl

Link to comment
Share on other sites

Guest lordbarron

Ok that worked thanks alot, much appreciated,, i was confused for the most part but its worked so im happy. Although im currently using a static link rather than a relative path just so i knew I defo had the location of the path correct. I can change that later and it shouldn't cause any problems.

also note to self (i am going to write a small guide when im finnished) the numbering system is in the order of when you created the documents, not alphabetical order. (i think).

Link to comment
Share on other sites

Join the conversation

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

Guest
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...