PDA

View Full Version : Suggest-link.tpl customization problem


Loren
06-02-2006, 12:32 PM
Hi Nick or anyone who can help me.

I customised my edit-link.tpl to show the fields individually ie. no foreach tags, and each one of my fields displayed, with an additional includion of a javascript script, that when you put your cursor over it display a pop up box with info in it for that field. All works wonderfully on this page right through to submission, and logging in the database.

Now i want to do the same with the Suggest-link.tpl and i have managed to remove the foreach and in between the foreach for the fields, and satisfactorily put everything in its place individually...however:

1) My description now does not tally the characters. (Fixed)

2) Upon submitting the suggest-link.tpl whereby it goes to suggest-link2.tpl to confirm your data. If Text and or HTML has been inputted in any of the textarea fields on page 1, only the text shows up. The HTML Code doesn't and if you submit to finalise it does not log the HTML in database either.

So question is how do i get the HTML data to go from page 1 to page 2 correctly and be finally submitted to database?

If its not something i am missing in my suggest-link.tpl file, then I'm thinking it must be something in the Suggest-link.php which is not set up for individual fields, would this be right?

Attached my code as i can't post too many characters.:ooi:

Any help would be grateful.

Loren
06-02-2006, 10:41 PM
Sorted #1..

Cris Santos
06-03-2006, 09:48 PM
Would you share?
I'm having trouble in my suggest-link.tpl when I try to input a little javascript to open a browser window.
I get an error which says :

Fatal error: Smarty error: [in suggest-link.tpl line 3]: syntax error: unrecognized tag: //v2.0 window.open(theURL,winName,features); (Smarty_Compiler.class.php, line 436) in /home/cristina/public_html/travel/smarty/Smarty.class.php on line 1095

what I tried to input was :


<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>

Loren
06-03-2006, 09:54 PM
Cris did you put {literal}tags around the javascript?{/literal} Try that first
:good:

ps if you have javascript in header too, do the same

Cris Santos
06-03-2006, 10:24 PM
aaah, thanks...

Loren
06-05-2006, 07:27 AM
Nick

Can you help me with this?

Nick Collins
06-05-2006, 08:45 AM
Hi Loren! Did you have this problem before suggest-link.tpl modifying?

Loren
06-05-2006, 09:32 AM
Hi Loren! Did you have this problem before suggest-link.tpl modifying?

No i don't think so. I shall test with the original page okay and get back to you.

Loren
06-05-2006, 11:43 AM
Original problem above
http://www.bandschool.co.uk/images/attachment1.jpg
when displayed no image, only characters where the images should be.

So Nick, here is what i have found. Went back to my original suggest-link.tpl and found that it did display the html image, but it had characters after.

Input before:
http://www.bandschool.co.uk/images/attachment2.jpg

Result:
http://www.bandschool.co.uk/images/attachment3.jpg

This .tpl's coding was block coding as foreach.


So..then went back further by replacing with original pro v1.2 file, does the same as my original suggest-link.tpl same as above 2&3 pic.

Also, i noticed, if i clicked back to re-edit info, it did not hold the original information in those fields which had the html in, instead in its place was partial info..if there was text as well as html code for image in the description, this would also be lost.

http://www.bandschool.co.uk/images/attachment4.jpg

Hope this helps to establish what is causing this? I guess that others will have the same problem too, as it exists with the original file.

Cris Santos
06-05-2006, 03:21 PM
Hi Loren.
I may be able to help you on one of your issues.

For logo, its possibly easiest if you simply create your field as "text" and then members can add a simple http: link to their image.

Code for photo :



<div class="logo">
{if $config.esc_codes}{text_to_html aText=$link.logo aParagraph=true}{else}{$link.logo}{/if}
</div>



It works perfectly for me and those strange "/>" have disappeared.
(full credit to Nick who supplied this help to me).

Loren
06-05-2006, 07:58 PM
Thank you kindly Cris for trying to help me :) I shall bare in mind this alternative as a last option, because i have other text area fields that i want to have both text and images. I just want to know why it works perfectly for the edit-link page and not for the suggest-link page. The only thing that is different is their relevant .php files.. and my mind goes awol looking at those files! So i will wait to see what the php experts have to say first.

Loren
06-06-2006, 06:45 AM
Nick any ideas?:)

Loren
06-09-2006, 02:03 PM
Any idea Simon when Nick will be back?

Still waiting for some ideas on how to solve this problem. Unless could take some time yourself to glance over it..would appreciate it :good:

Loren
06-11-2006, 10:43 PM
Well here i am again...Hope your well Nick..:good:

Would like very much for this to be looked at :)

Nick Collins
06-13-2006, 07:42 AM
Hi Loren! I can not say for sure what wrong with your code. Please PM your ftp credentials and sample of html code which doesn't works properly.

Loren
06-14-2006, 01:00 PM
Sent you my details Nick :good:

Nick Collins
06-15-2006, 05:40 AM
Check your mail box, please!

dkessaris
06-20-2006, 12:10 PM
Hi, did you find a solution for this one, I am having a similar problem here (http://www.esyndicat.com/forum/about5932.html)
I have also noticed that after applying the patch I can't add html in additional fields either.

Nick Collins
06-21-2006, 04:12 AM
I have already answered at the thread you posted above.