Html is being truncated on save in drupal (full html) - drupal

If I unput a certain piece html into my page, it seems to be truncating:
<div id="slideshow">
<img style="cursor: pointer;" src="files:img/slideshow/3.png" id="left_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/1.png" id="center_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/2.png" id="right_slide" alt=""/>
</div>
It all looks good in the preview, but when I save it it becomes:
<div id="slideshow">
<img style="cursor: pointer;" src="http://local.drupal.com/sites/default/files/img/slideshow/3.png" id="left_slide" alt="" />
</div>
I'm at a loss! I'm not using any nasty WYSIWYG editors and the input format is full html. The second code example indicates that I'm using the path filter module but I've also tried disabling that and resaving. It still truncates.
I'm using Drupal 6.19.

You certainly print the teaser only.
To publish to the front page the complete node Go to Administer > Content Management > Post Settings > Choose 'unlimited' from the 'length of trimmed post' select box.
You can also manually controlling the teaser break point by inserting:
<!--break-->
If you use a views you can control if you want to show the complete node or the teaser in the settings of the view.

Related

Images not shown properly in ASP.NET MVC

I am trying to use some images with ASP.NET MVC. I've created a folder to store them and then I've pulled them from the solution explorer to code.
View code :
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">
<img src="~/Images/Logo.png" width="125" height="74" class="img-responsive" />
<img src="~/Images/Logo.png" />
</a>
Code of the page when inspected on Google Chrome :
<img src="/Images/Logo.png" width="125" height="74" class="img-responsive">
When I run the application they appeared broken on the browser. I have checked the path, properties, and everything is correct, but I can't fix this.
you could trying using #Raw
<dd>
<img src="~/Images/#Html.Raw(Model.PhotoUrl)" alt="Image" style="width: 500px; height: 300px;"/>
</dd>
Just found the problem. I create a folder name "Images" in solution explorer to store all my images, but that was conflit with the forder "images" in the "CSS" folder. I move my image to the "image" folder in "CSS" folder and everything works perfect.

Images not showing on Amp version

Images work on normal page but the amp-version the images doesn't show.
here is a HTML code of a picture, I use WordPress and upload via media library and insert:
<img class="aligncenter wp-image-312" src="http://mysiteexample.com/wp-content/uploads/2016/11/review-1024x768.jpg" alt="Stanley Review" width="256" height="192" />
"
Is there a script I need to insert or something for it to work on amp?
Thanks for your time, I appreciate it.
Use amp-img instead of img for the amp version of your site.
<a href="#">
<amp-img src="http://mysiteexample.com/wp-content/uploads/2016/11/review-1024x768.jpg" width="256" height="192" layout="responsive" alt="Stanley Review"></amp-img>
</a>

Fill figure img in ul from SQL Server database

I'm trying to create an Asp.Net page (without razor) to list and show some products from a database. I need image, explanation and PDF path to show from my SQL Server 2008 R2 database.
I have been looking for examples but many of them are about filling tables, not ul elements. I have seen some razor page examples but I have no idea how that works.
Note: I don't want to change this style, because I used some cool bootstrap css hover things. I don't want to mess with that, but if you think it is necessary to change it, then of course I can figure out something.
Code:
<ul class="grid cs-style-5" id="thumbs">
<li>
<figure>
<img class="img-responsive" src="#">
<figcaption>
<h4>Product Name/h4>
<span>Explanation here.</span>
Technical Info
</figcaption>
</figure>
</li>
</ul>
Update:
I figured out how to do what I needed. I am posting here in case someone else needs too. I didn't use asp:repeater but I used DataList. It worked perfectly.
Fixed Code:
<asp:DataList ID="DataList1" runat="server">
<HeaderTemplate><ul class="grid cs-style-5" id="thumbs"></HeaderTemplate>
<ItemTemplate>
<li>
<figure>
<img class="img-responsive" src='<%# Eval("urun_resim") %>' />
<figcaption>
<h4>Product Name: <%#Eval("urun_isim") %>i</h4> <br />
</figcaption>
</figure>
</li>
</ItemTemplate>
<FooterTemplate></ul></FooterTemplate>
</asp:DataList>
Repeater is good option. I agree with that solution. Even this will help you for responsive design. This is even light weight to load.

How can I add pagination to my site's gallery?

I'm trying to integrate CSS pagination into a thumbnail gallery I have set up on my site. So far, I haven't found any tutorials pointing to how to customize pagination into a existing script.
From what I see out there, there are a lots of great CSS pagination solutions. Here's a page with lots of pagination stylings (no plugins, integration seems to be very general so any will do). I've downloaded a few in hope that a tutorial directs me to what I want but have had no luck so far.
My code is taken from Pure CSS image gallery. I had a look at integrating Gallerific but found the instructions difficult, and so I'm looking for a pure CSS solution.
At first I wanted to used multiple div's for the same gallery, much like Gallerific, only to find JavaScript (or some kind of jQuery solution) would be needed to connect the links necessary for the gallery to work like that.
Currently, the gallery is contained within one div (the way it has to be in order to work). I'm looking at adding pagination just on the thumbs e.g. "...<a href="#prev01"><img src="images/img/thmbs/01.jpg" alt="" class="thumb" />
..."
And here for purpose of the post is my code so far:
<div id="gallerycenter">
<ul id="gallery">
<li>
<a href="#prev01"><img src="images/img/thmbs/01.jpg" alt="" class="thumb" />
<span><img src="images/img/01.jpg" id="prev01" class="showcase" alt="" /></span></a>
</li>
<li>
<a href="#prev02"><img src="images/img/thmbs/02.jpg" alt="" class="thumb" />
<span><img src="images/img/02.jpg" id="prev02" class="showcase" alt="" /></span></a>
</li>
<li>
<a href="#prev03"><img src="images/img/thmbs/03.jpg" alt="" class="thumb" />
<span><img src="images/img/03.jpg" id="prev03" class="showcase" alt="" /></span></a>
</li>
<li>
<a href="#prev04"><img src="images/img/thmbs/04.jpg" alt="" class="thumb" />
<span><img src="images/img/04.jpg" id="prev04" class="showcase" alt="" /></span></a>
</li>
<li>
<a href="#prev05"><img src="images/img/thmbs/05.jpg" alt="" class="thumb" />
<span><img src="images/img/05.jpg" id="prev05" class="showcase" alt="" /></span></a>
</li>
</ul>
</div>
The only thing I have thought of but haven't tried is changing the ".thumb" to ".pagination" in order to start the "pagination" in a class form but still, that doesn't give me enough to go on
Can anyone help me piece together the possibilities or confirm that I'm crazy and I'm asking way too much of CSS?
You've misunderstood the link you posted. It is providing style only, not functionality, because CSS does not provide this functionality. Pagination is not a matter of adding style to a page, it is achieved programatically, either server-side or in client-side JavaScript. You should pick an existing jQuery pagination plugin and use it, you will not find a solution which uses only CSS to provide pagination as that is fundamentally not what CSS is for.

<a href> with image is disable in Chrome

hey, i have a .net C# function thats write html image links code such as:
<img src="..." />
and show it by asp:literal,
it works fine in Explorer and Firefox but in chrome the clicking is disable,
any ideas?
example code:
<div class=\"whitebox\" style=\"width:500px;\">
<div style=\"float:left;\">
<a href=\"../reader/Default.aspx?u=4&t=2&sr=f-53D\">
<img width=\"75px\" height=\"75px\" src=\"http://www.Knu.com/main.jpg\" />
</a>
</div>
</div>
The only problem I can see with that is if you're somehow outputting it exactly like that, with the C# escaping included.

Resources