Page master w/Images in each post

So my problem is simple hopfully. My main page which lists all posts "most recent" includes the following: title, Description (1st sentence), link to the details page and an Image. The problem is that I have several images related to each "Post", so it shows it more than once. For example, one I have 3 images of and it publishes all 3 different images, but the same title, description and link.

How can I overcome that it is only to enter the 1st image related to the post? And how do I have text and description 'float' above the image. As everything is in a < p > and just a loop.

In my functions.php

function getAllPosts ($read) {}

$sql = ' SELECT *.

MESSAGES

INNER JOIN post2photo USING (post_id)

INNER JOIN photos USING (photo_id)

ORDER BY created DESC';

return $read-> fetchAll ($sql);

}

In my Master.php

$feature = getAllPosts ($dbRead);

<? PHP foreach ($feature as $post) {? >}

< p >

<? PHP echo $post ['name'];? >:

<? PHP echo ['description']? >

< span id = "places" > < img src=".../image_upload/ <? PHP echo $post ['filename'];? ">" width = "400" / > < / span >

< a href = "detail.php? site = <?" PHP eco $post ["link_name"];? > "> more information < /a >"

< /p >

<? PHP}? >

Think I found it...

function getAllPosts ($read) {}

$sql = ' SELECT *.

MESSAGES

INNER JOIN post2photo USING (post_id)

INNER JOIN photos USING (photo_id)

GROUP BY post_id

ORDER BY created DESC';

return $read-> fetchAll ($sql);

}

Do what he catches only one instance of each post photo. I'm testing to ensure that it is the right solution.

Tags: Dreamweaver

Similar Questions

  • How batch edit several files to add images on each page

    Hello

    I have pdf files (about 1000) and all of them have several files. Is it possible using Acrobat DC (grammatically or using a function or tool) I can change everything in batch to have an image at the bottom of each page?

    The same image on each page in each file? If so, you can use the command Add watermark in an action brought in Acrobat Pro to achieve this.

  • The page master, menu and images... why the menu disappear when adding an image full screen?

    Hi all

    I use the widget Menu Muse on the single page Master on the site, but disappears from menu to a page where I placed an image "full screen".  Is there a 'picture-holder' that I could use and still have Visual and using the menu? (hope that makes sense).

    Go to your master page open the "Layers" Panel, create a new layer above all others and drag the entries in the layer of everything on that menu. This works, because the layers are not confined to a single page (master), but work across the site.

  • Different background image with each page?

    Hello Adobe community,

    I'm working on my portfolio and immerse myself in the CSS, I seems to have hit a bump in the evolution of the background image to each page.

    I watched a previous response and changed my style sheet to reflect the body classes that I did, but nothing seems to go right!

    http://dayandnightwebsolutions.com/

    Thank you

    Robert

    Edit, my images are locaed in '\public_html\img '.

    My CSS stylesheet is located in "\public_html\css".

    Then...

    Page needs to look inside...

    Body.index {background-image: url (.. /IMG/main-BG.jpeg);}

    Body.Services {background-image: url (.. /IMG/BG-Moon.jpeg);}

    Body.contact {background-image: url (.. /IMG/BG-Sun.jpeg);}

    ?

    Your file extension isn't actually .jpg and .jpeg. Change this in your CSS.

    Remove the prefix of body for all classes. Just use .index, .to & .contact in your CSS file. When using it in your HTML markup, include this class in any switch like body or div or any other thing.

    And above all, should any space between the url and (.)

    Change this:

    Body.index {background-image: url (.. /IMG/main-BG.jpeg);}

    to do this:

    .index {background: url (.. /IMG/main-BG.jpg);}

    Note that I deleted - image. This can be read by most modern browsers and is a short form. You can add properties of background much like repetition, position, etc. in the main tag 1.

    Trust that this assistance.

  • Blocks of text on the Pages of body 'Buried' after update of the Page Master

    I have a background full screen on my main page (on the left in this case) that integrates static graphics and borders for certain master pages. I use the borders/boxes for NOTE and END of text on some pages. Blocks of text on these master pages do not overlap. I added text blocks with my icons and the text of the note to these body Pages that I need them. All great so far.

    I decided to update the background chart on page master to change colors, etc.. All files are linked.

    Now, with funds master page updated, these pages where I added text blocks are 'buried' as on a sublayer. I checked that my Master Page background images are "sent back". I tried to wear my text boxes at the front on the Pages of my body, but they are still hidden. Interesting as the anchored frame (the icon), I attached to each NOTE or TIP point appears, but the text is not. Also, I can see and select the contours of the block... the text is hidden. If I drag the fame to another part of the document (for example, on top of another Master Page text frame sank, while the text is displayed.

    There is no image on the master page to the enclosed area. I wonder if that's what I need trouble. Just add a backstory (not attached flow)?

    Advice before I go and screw something else?

    It is what it is supposed to look like (1). Image (2) what I mean now.

    V7Page2.jpg

    V7Page.jpg

    Thanks Arnis,

    It was the property of skin! How simple... I didn't have on this subject.

    Solved!

    To answer you question, however... my approach for the construction of this new model was:

    1. I created a graph from bottom (full page) to contain the image of brand and imported/positioned.
    2. I placed the header and a footer frame and filled with content.
    3. I placed the blocks of text with streams (as a single stream in this document).

    I'm not dropping blocks of text for the content of the body... except for these tips and remarks. I don't want to use a workflow for this because I never know where they'll pop up and I want to be able to (position) specifically on each page. Is this a good approach?

    Yes, I'm aware of the continuous line down the block of text NOTE you mentioned. Originally, I had all the text within the limits. When I have updated master, all offbeat pages (only in blocks of text body page with notes/tips). I repositioned and they flow very well now.

    Thank you very much for your help continues with it. Why these problems always pop nitpciky - up to date - not when things are slow!

  • Can I get an imagefield to fill images on all pages once the image is uploaded

    Hello

    I'm fairly new to LC and I have a dynamic long form from scratch. This form will be used by sales, which will be

    'configure' services, taxes ect to be on the form, then send it to the applicant to be filled. I wish that our sales representative to be able to upload an image to a field of the image (logo) and this logo to be displayed at the top of each page. As I can't seem to add an image field action, how can I do? Million thanks in advance!

    They do not have access to the page master - the master page is what the form is built on, where you set your margins, setting page, boilerplate info, etc.

    You could also have a field of the image on the first page and the image of the field where else you need them and use the global binding to share the same data - for global binding to work they must have the same name and then on the object > link set palette data binding to use global data.

    Or you could code with the rawValue: imageField2.rawValue = imageField1.rawValue;

  • Affecting elements of Page Master unique any spread

    Another day, another little problem.

    I'm on the latest Indesign, 2015.4. I'm working on a file that is an update a for a year, so I've been using a previous version of Indesign, then held well.

    Basically, I have a document divided into sections. Each section has a distinctive colour that extends from the external purge exactly at the edge of the page in the gutter, sure it overlaps on the next page.

    Here are the settings in master pages.

    But I need to change their height on a page by page basis, if I click to get around. However, when I do that, Indesign jumps into a new element behind. I noticed that this does not happen if the items do not extend to the edge of the gutter. So as a solution, I stopped being the width color bars full page.

    Example:

    Here is my purple section with the applied master page:

    Screen Shot 2016-08-19 at 12.08.25.png

    Here I clicked to replace this purple bar and drag it to the right height. But Indesign has added a new green bar, because the master page applied to the page on the right in this spread, which is the beginning of the Green section of the document:

    Screen Shot 2016-08-19 at 12.08.32.png

    My work around is this page master points cannot run on the edge of the gutter. I always substitute as before, but in height and width. But Indesign doesn't add them to the nearby page more:

    Screen Shot 2016-08-19 at 12.23.53.png

    I think you might have misunderstood me. Half a mm is only on master pages. Simply stop the glitch to occur on pages that have a master applied. I then override it on every page and let it slide to the edge once he became a page element, thus fully bridge the gap.

    If the gap at the edge of the master page is not enough, the problem occurs.

  • Conflicting style sheets in HTML Page Master?

    Hey all, got an interesting case here. My apologies to read for a long time.

    I worked with a web developer here at my company to create a nice little script for a feedback tab that appears on each topic. Click, opens upward to was this useful > Yes or No. Clicks of the user, and the server sends the results. Works very well end front and back.  However, there are some funny behaviors on the side of the project.

    The part of the code is below (these are the last three lines; I have bolded the line in question)

    " < script src =" http://AJAX.googleapis.com/AJAX/libs/jQuery/2.2.4/jQuery.min.js "> < / script > .

    "" < script src = "... /guidefeedback/feedback.js?v1.0" type = "text/javascript" > < / script >

    "< link href ="... / guidefeedback/feedback. CSS? V1.0"rel ="stylesheet"type =" text/css">

    When I let down all of the code in the bottom of the Page Master (in HTML mode of course), RoboHelp accepts, acknowledges the scripts, etc., but it automatically moves the bold line to the header, directly under the line of code to the Master Page by default CSS:

    < link rel = "StyleSheet" href = "Millennium_OnlineBooking.css" type = "text/css" / > "

    "< link href ="... / guidefeedback/feedback. CSS? V1.0"rel ="stylesheet"type =" text/css"/ >

    < / head >

    Now if I just leave it alone, regenerate and place the output on the server, everything works fine. But if I do a minor change to the Master Page, either in HTML or Design discover... and save, it sweeps away the default CSS that applies to all topics. The code in the HTML of the Page master remains the same, the CSS default remains the same, but if I look at individual topics Properties > appearance, the CSS was missed against zero. If I delete this line of code "BOLD", I can make changes to the Master Page to the content of my heart with any strange behavior or change of stylesheet to themes. This line is certainly confound HR somehow.

    I know a simple solution is to simply pull the top of the topic list and reapply the CSS wanted to all subjects, and I know that I will rarely change a Master Page as soon as I understand how I like it, but I can't help but think that we are missing a fundamental tweak that will allow HR to manage two CSS.

    Does anyone know what I'm missing here?

    Thanks in advance!

    Joe C.

    You can add multiple CSS files to a topic in RoboHelp, but it does not include the RoboHelp dialog box. Nothing to do about it. I also tried to use the @import rules, but HR doesn't like either. I the end I merged al my files into one. This works as expected.

  • Why my Page master is crushing my CSS styles?

    I just upgraded my TCS of the 2015 release 4.0. In the process of updating my team models, I discovered a problem that I have not met before.

    We have a custom CSS. We have our FM HR manuals and custom CSS helps keep our subjects a single source set shaped like we like them. When you apply the CSS custom HR, everything looks and works like a charm.

    We also have a custom master page that inserts a header bar and the bar footer on each page. I went into the properties of the file of the Page Master and applied the CSS custom to that Master Page.

    However, when I apply the Master Page in the list of topics, the format of the body looks different, he has just the CSS has been applied (when no Master Page is applied). I've included two screenshots - an are only applied CSS and the other with the Master Page.

    I tried to apply two CSS and the Master Page by the general and the appearance of the Properties dialog box tabs, but I always get the same question. I also checked the HTML view and the correct CSS file is linked in the head.

    Why these two things are not talking to each other?

    CSS.jpgMasterPage.jpg

    Hi Sarah,.

    I looked at the project and found that the problem comes from the binding process. The topics generated using 2 CSS files: the inforeliance one and the other for the FrameMaker file with styles not mapped. Assign master page removes this second CSS file while the inforeliance THAT CSS is used.

    In my view, that the solution is to improve the mapping of files in the file CSS inforeliance FM. If all your styles of FM are mapped, there will be no more difference. I hope Jeff can verify this.

  • display the image of the poster after that HTML5 is played

    Using HTML5 video on the page. Image display and video is read. When the video is finished, I get only the black background in the video window. How to re - view my image of the poster?

    Take a glance at StackOverflow.

    HTML5 Video / end of a video poster - stack overflow

    I've never written a script like this b/c I am not reloading the page unnecessarily is a good thing.    JS code goes inside

  • Pages - master Panel went haywire

    Hi all - can someone please explain what the two small black boxes are on my master spreads in the pages Panel? (image below) It seems to have turned off the items on the masters and all the pages that they are applied to the - go crazy, please help!

    pagespanel.jpg

    IDML is IDML. You will get the same result with Save as or export.

    This is supposed to be the same for CS4 and later versions. Save as IDML and open the IDML.

  • A new problem for me. Objects on page master inaccessible

    Hello

    I'm puzzled by this one. I placed objects (type, objects, charts, bars) on the Master Page that are repeated on each new page. But when I go to new pages, I can't select type, the object boxes boxes or colorful bars. There is a single layer, and it is not locked. The objects that I placed on the Masterpage don't highlight when I go to the document itself, as if they were alone in the background.

    Gah! What I forget?

    Al

    It is a natural behavior for InDesign. If you want to select a master item on your document page, hold down the shift + command (mac) while selecting. (There is a combination of keys for PC as well, but I don't know).

  • Page master readOnly or protected fields always opens to page 2 of the PDF

    I have a fluid shape that I added some textfields to the Master Page to have on each page.

    I put the global linking for the filling of form fields can be accessed from any page.  It works very well, fill in the fields and the changes to the fields appear on each page.

    The problem: I need to lock these fields after submit.

    I added the JavaScript code in the reference material at my submit button that detects and sets the access to all page fields of body 'read-only '.  No problem with this script.

    I'm not an experienced writer of JavaScript, in order to lock the fields on the master page, I put each field individually to "readOnly".

    It works fine on page 1 of the final PDF, the fields are locked.

    On page 2, however, the fields are always available.  In fact, change the values in the page 2 fields also change values in the fields in page locked 1.

    I tried using the relative and the absolute som SOM to change the property but no change in the results.

    I also tried changing the 'readOnly' property 'protected' with no change in results.

    Can someone tell me what I am doing wrong?

    Hello

    Each master page has own number.

    To lock the second master page, you need to access it correctly, you can try a script like this:

    main.pageSet [0] .yourMasterPageName [index].filedName.access = "readOnly".

    index - index of the page master from 0. In your case it shoul be 1.

    Each master page has own number.

    Best reagards,

    Paul Бутенко

  • Problem with text box on the Page Master application to other pages.

    I've done this before with success, but maybe I'm missing something and don't have the time to waste on this one there...

    I applied a text box to the master page. I applied the master page to all the other pages, but on each page, the text box will appear like this:

    Picture 1.png

    I can not type in the text box or select or something. I have a go back to the Page Master and the text box is a-okay.

    What I'm missing or doing wrong this time?

    Me once again and I have the solution!

    1. place the text boxes where you want on your Master.

    2. go in the 'Pages' Panel and highlight all the pages.

    3. in the "Pages" options of the sliding panel, choose "replace all Master Page items.

    Now, all your pages have a floating text box!

    See you soon!

    Mikey

  • As soon as I opened the Firefox Start Page, all my favorites have been posted on the left side. I accidentally hit something, and now all my favorites have disappeared. Help.

    As soon as I opened the Firefox Start Page, all my favorites have been posted on the left side. I accidentally hit something, and now all my favorites have disappeared.

    For your safety, you must do a lot of software updates. You may be holding back for some reason any. Let us know what it is because there may be a fix or workaround now.

    To update to the 19 of Firefox, you can use the "Check for updates" button here:

    Menu help > about Firefox

    To update your Adobe PDF and Shockwave Flash plugins and check for other obsolete plugins, you can use this page:

    https://www.Mozilla.org/en-us/pluginCheck/

    I know it's tedious, but don't let slip too long or you might get up to have to rebuild everything (the curse of your lack of backups, and if you do regular backups).

Maybe you are looking for