Compare commits
2 Commits
58e134637c
...
6c59be35a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c59be35a9 | ||
|
|
137aedcfb3 |
@@ -2,8 +2,8 @@
|
|||||||
-- PostgreSQL database dump
|
-- PostgreSQL database dump
|
||||||
--
|
--
|
||||||
|
|
||||||
-- Dumped from database version 18.1
|
-- Dumped from database version 18.3
|
||||||
-- Dumped by pg_dump version 18.1
|
-- Dumped by pg_dump version 18.3
|
||||||
|
|
||||||
SET statement_timeout = 0;
|
SET statement_timeout = 0;
|
||||||
SET lock_timeout = 0;
|
SET lock_timeout = 0;
|
||||||
@@ -86,6 +86,29 @@ CREATE TYPE public.user_rank_enum AS ENUM (
|
|||||||
|
|
||||||
ALTER TYPE public.user_rank_enum OWNER TO kabano;
|
ALTER TYPE public.user_rank_enum OWNER TO kabano;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: content_comment_photos; Type: TABLE; Schema: public; Owner: kabano
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE SEQUENCE public.content_comment_photos_id_seq
|
||||||
|
AS integer
|
||||||
|
START WITH 1
|
||||||
|
INCREMENT BY 1
|
||||||
|
NO MINVALUE
|
||||||
|
NO MAXVALUE
|
||||||
|
CACHE 1;
|
||||||
|
|
||||||
|
ALTER SEQUENCE public.content_comment_photos_id_seq OWNER TO kabano;
|
||||||
|
|
||||||
|
CREATE TABLE public.content_comment_photos (
|
||||||
|
id integer NOT NULL,
|
||||||
|
comment_id integer NOT NULL,
|
||||||
|
url text NOT NULL,
|
||||||
|
creation_date timestamp without time zone DEFAULT now()
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE public.content_comment_photos OWNER TO kabano;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: content_comments_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
-- Name: content_comments_sequence; Type: SEQUENCE; Schema: public; Owner: kabano
|
||||||
--
|
--
|
||||||
@@ -407,6 +430,19 @@ CREATE TABLE public.users (
|
|||||||
|
|
||||||
ALTER TABLE public.users OWNER TO kabano;
|
ALTER TABLE public.users OWNER TO kabano;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: content_comment_photos id; Type: DEFAULT; Schema: public; Owner: kabano
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY public.content_comment_photos ALTER COLUMN id SET DEFAULT nextval('public.content_comment_photos_id_seq'::regclass);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: content_comment_photos content_comment_photos_pkey; Type: CONSTRAINT; Schema: public; Owner: kabano
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY public.content_comment_photos
|
||||||
|
ADD CONSTRAINT content_comment_photos_pkey PRIMARY KEY (id);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Data for Name: locales; Type: TABLE DATA; Schema: public; Owner: kabano
|
-- Data for Name: locales; Type: TABLE DATA; Schema: public; Owner: kabano
|
||||||
@@ -625,6 +661,14 @@ CREATE INDEX users_is_archive_index ON public.users USING btree (is_archive);
|
|||||||
CREATE INDEX users_register_date_index ON public.users USING btree (register_date);
|
CREATE INDEX users_register_date_index ON public.users USING btree (register_date);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: content_comment_photos content_comment_photos_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY public.content_comment_photos
|
||||||
|
ADD CONSTRAINT content_comment_photos_comment_id_fkey FOREIGN KEY (comment_id) REFERENCES public.content_comments(id) ON DELETE CASCADE;
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: content_comments content_comments_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
-- Name: content_comments content_comments_author_fkey; Type: FK CONSTRAINT; Schema: public; Owner: kabano
|
||||||
--
|
--
|
||||||
|
|||||||
BIN
public/medias/watermark.png
Normal file
BIN
public/medias/watermark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
@@ -99,7 +99,7 @@ section.archive > * {
|
|||||||
#new_comment_form #photo {
|
#new_comment_form #photo {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#new_comment_form .upload-btn {
|
#new_comment_form #upload-btn {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-bottom: 2px solid blue;
|
border-bottom: 2px solid blue;
|
||||||
|
|||||||
@@ -182,7 +182,7 @@
|
|||||||
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
||||||
<div id="comments_photos_gallery" class="gallery">
|
<div id="comments_photos_gallery" class="gallery">
|
||||||
<?php foreach ($poi_comments->objs as $comment) { ?>
|
<?php foreach ($poi_comments->objs as $comment) { ?>
|
||||||
<?php if (!empty($comment->photo)) { ?>
|
<?php if (!empty($comment->photo) && $comment->is_archive != 't' && $comment->is_public != 'f') { ?>
|
||||||
<a href="<?=$config['rel_root_folder'].'medias/comment_photos/'.$comment->photo?>">
|
<a href="<?=$config['rel_root_folder'].'medias/comment_photos/'.$comment->photo?>">
|
||||||
<img src="<?=$config['rel_root_folder'].'medias/comment_photos/'.$comment->photo?>" title="<?= (mb_strlen($comment->comment) > 50 ? mb_substr($comment->comment, 0, 50) . '...' : $comment->comment) ?>">
|
<img src="<?=$config['rel_root_folder'].'medias/comment_photos/'.$comment->photo?>" title="<?= (mb_strlen($comment->comment) > 50 ? mb_substr($comment->comment, 0, 50) . '...' : $comment->comment) ?>">
|
||||||
</a>
|
</a>
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
<div id="new_comment_form">
|
<div id="new_comment_form">
|
||||||
<textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea>
|
<textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea>
|
||||||
|
|
||||||
<label for="photo" class="upload-btn">
|
<label for="photo" id="upload-btn">
|
||||||
<i class="fas fa-file-image"></i> Ajouter une photo
|
<i class="fas fa-file-image"></i> Ajouter une photo
|
||||||
</label>
|
</label>
|
||||||
<input type="file" id="photo" name="photo" accept="image/*">
|
<input type="file" id="photo" name="photo" accept="image/*">
|
||||||
@@ -219,6 +219,14 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById('photo').addEventListener('change', function() {
|
||||||
|
document.getElementById('upload-btn').innerHTML = this.files.length
|
||||||
|
? "<i class='fas fa-check-square'></i> Photo sélectionnée"
|
||||||
|
: "<i class='fas fa-file-image'></i> Ajouter une photo";
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
||||||
<!-- Comment list -->
|
<!-- Comment list -->
|
||||||
<div id="comments">
|
<div id="comments">
|
||||||
|
|||||||
Reference in New Issue
Block a user