Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4064708
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:53:25+00:00 2026-05-20T15:53:25+00:00

when the user is about to add an image to an article i used

  • 0

when the user is about to add an image to an article i used the image list to enable him add images in a separate section and add them to article from tinyMCE but what will happen if we have a massive amount of images the user will find a long list!! it will not be easy at all?
so i wish to find a way to lmake each article has its own images list images_list.php?article_id=333.. .

an accordion is the container of all articles titles in a section
when click edit or add ajax with tinymce do the work
but how to change the external_image_list_url property of each article?????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:53:25+00:00Added an answer on May 20, 2026 at 3:53 pm

    when generating the javascript List with a php-file, like this example from moxiecode, you should be able to get your images depending on the article.

    Have fun !

    Example of a PHP-generated image list file

    <?php // this must be the very first line in your PHP file!
    
    // You can't simply echo everything right away because we need to set some headers first!
    $output = ''; // Here we buffer the JavaScript code we want to send to the browser.
    $delimiter = "n"; // for eye candy... code gets new lines
    
    $output .= 'var tinyMCEImageList = new Array(';
    
    $directory = "../../img"; // Use your correct (relative!) path here
    
    // Since TinyMCE3.x you need absolute image paths in the list...
    $abspath = preg_replace('~^/?(.*)/[^/]+$~', '/$1', $_SERVER['SCRIPT_NAME']);
    
    if (is_dir($directory)) {
        $direc = opendir($directory);
    
        while ($file = readdir($direc)) {
            if (!preg_match('~^.~', $file)) { // no hidden files / directories here...
                 if (is_file("$directory/$file") && getimagesize("$directory/$file") != FALSE) {
                    // We got ourselves a file! Make an array entry:
                    $output .= $delimiter
                        . '["'
                        . utf8_encode($file)
                        . '", "'
                        . utf8_encode("$abspath/$directory/$file")
                        . '"],';
                }
            }
        }
    
        $output = substr($output, 0, -1); // remove last comma from array item list (breaks some browsers)
        $output .= $delimiter;
    
        closedir($direc);
    }
    
    // Finish code: end of array definition. Now we have the JavaScript code ready!
    $output .= ');';
    
    // Make output a real JavaScript file!
    header('Content-type: text/javascript'); // browser will now recognize the file as a valid JS file
    
    // prevent browser from caching
    header('pragma: no-cache');
    header('expires: 0'); // i.e. contents have already expired
    
    // Now we can send data to the browser because all headers have been set!
    echo $output;
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want let user to upload images to server add some info (like description,
In a Java project (SWT desktop app), I want to inform the user about
Clarification: this is not about user agent calls to pages, but Classic ASP calling
The Reporting Database in Project Server 2007 has about 7 User Views based on
I asked about Choosing a method to store user profiles the other day and
I'm about to purchase a copy of Windows Server 2008 (User CAL, 5 CLT)
I'm about to implement a feature in our application that allows the user to
How can I go about storing a vb.net user defined object in a sql
How would a go about making a program where the user enters a string,
How would you go about producing reports by user selected date ranges in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.