Ticket #2393 (closed New Feature: duplicate)

Opened 6 years ago

Last modified 6 years ago

Links to database pages

Reported by: MikeVrind Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: FCKeditor 2.6.2
Keywords: Cc:

Description

Hello,

It should be easier to create a own list of links in the link dialog. At this moment i'm using some PHP code to create a list of internal links:

			function fillURL(internPage)
			{
				document.getElementById('txtUrl').value = internPage;
				
				document.getElementById('optionHTTP').selected = false;
				document.getElementById('optionOTHER').selected = true;
			}

PHP:
			<select id="cmbLinkType" onChange="SetLinkType(this.options[this.selectedIndex].value);">
				<option value="url" fckLang="DlgLnkTypeURL" selected="selected">URL</option>
				<option value="anchor" fckLang="DlgLnkTypeAnchor">Anchor in this page</option>
				<option value="email" fckLang="DlgLnkTypeEMail">E-Mail</option>
					<?php
						
						$pageCats = mysql_query("SELECT * FROM pagina_categorie ORDER by categorie_id ASC") or die ( mysql_error() );
						
						while ( $getCat = mysql_fetch_assoc ( $pageCats ) )
						{
						
							echo '<optgroup label="'.stripslashes($getCat['categorie_naam']).'">';
							
							$pages = mysql_query("SELECT pagina_id, pagina_titel FROM paginas WHERE pagina_categorie=".$getCat['categorie_id']." ORDER BY pagina_titel ASC") or die ( mysql_error() );
							
							while ( $Get = mysql_fetch_assoc ( $pages ) )
							{
								echo '<option value="url" onclick="fillURL(\'cardan/index/'.$Get['pagina_id'].'/'.stripslashes($Get['pagina_titel']).'\');"> '.stripslashes($Get['pagina_titel']).' </option>';
							}
							
							echo '</optgroup>';
						
						}
						
					?>
			</select>

This only doesn't work in IE7, but when I change the function SetLinkType to check the value of a selected item, de link dialog doesn't work anymore. FireBug reports the following error:

A is undefined FCK.Description="FCKeditor for Gecko Bro...tem(i);E.href=A;B.push(E);}};return B;};

So there should be a option in FCK that makes it easer to create own links in de option dialog.

Change History

comment:1 Changed 6 years ago by fredck

  • Milestone FCKeditor 2.6.3 deleted

comment:2 Changed 6 years ago by fredck

  • Keywords links removed

comment:3 Changed 6 years ago by arczi

  • Status changed from new to closed
  • Resolution set to duplicate

DUP of #288

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy