Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Websites
/
SlimSpots Wiki
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit d9609e44
authored
2015-02-18 17:20:02 +0100
by
Aleksandar Hristov
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added sub-section templates in tinymce
1 parent
2ad2c705
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
5 deletions
html/index.php
html/static/css/slimspots-wiki.css
html/static/js/main.js
html/tpl/faq.tpl
html/tpl/header_admin.tpl
html/index.php
View file @
d9609e4
...
...
@@ -21,18 +21,20 @@ $db = new SQLite3('wiki.db');
$url
=
$_SERVER
[
'REQUEST_URI'
];
//
gotta solve this, it's not certain that there's a page with id=1
//
if there's no "?page#id" string in the URL then show the page with the lowest ID from the database (should be the first created one)
if
(
strpos
(
$url
,
'?'
)
===
false
)
{
$current_page
=
$db
->
querySingle
(
"SELECT MIN (id) FROM pages"
);
}
//else if there's "?page#id" string in the URL get the page
else
{
$current_page
=
explode
(
'?'
,
$url
);
$current_page
=
$current_page
[
1
];
}
//assign smarty variables and display the index.tpl
$smarty
->
assign
(
"current_page"
,
$current_page
);
$smarty
->
assign
(
"page_id"
,
main_page
(
"page_id"
,
$current_page
));
$smarty
->
assign
(
"page_title"
,
main_page
(
"page_title"
,
$current_page
));
...
...
html/static/css/slimspots-wiki.css
View file @
d9609e4
...
...
@@ -143,4 +143,16 @@ label
left
:
0
;
width
:
100%
;
height
:
100%
;
}
.sub-title
{
margin-left
:
10px
;
font-size
:
20px
;
}
.sub-sub-title
{
margin-left
:
20px
;
font-size
:
18px
;
}
\ No newline at end of file
html/static/js/main.js
View file @
d9609e4
...
...
@@ -6,8 +6,6 @@ $("p").addClass('editable');
$
(
"img"
).
addClass
(
'img-responsive'
);
//Sidebar dropdown; it allows sub-menus to drop on click
(
function
(
$
)
{
$
(
document
).
ready
(
function
()
{
...
...
html/tpl/faq.tpl
View file @
d9609e4
...
...
@@ -27,8 +27,9 @@
<ul>
<li>
Choose what element you want to edit (page or section);
</li>
<li>
Choose the specific element you want to edit (the search field is your friend!);
</li>
<li>
Give it a new title if needed;
</li>
<li>
Type the new text using Markdown Extra (cheat sheet shown below);
</li>
<li>
Click the "Edit" button to open the Editor;
</li>
<li>
Give the page/section a new title if needed;
</li>
<li>
Type the new text;
</li>
<li>
Click the "Submit" button.
</li>
</ul>
<h5>
3. Removing a page/section
</h5>
...
...
html/tpl/header_admin.tpl
View file @
d9609e4
...
...
@@ -39,6 +39,18 @@
tinymce
.
init
({
selector
:
"textarea"
,
height
:
500
,
browser_spellcheck
:
true
,
templates
:
[
{
title
:
"Sub-section title"
,
url
:
"tpl/tinymce_templates/sub-title.html"
,
description
:
"Enter the number in front (e.g. 2.7 Test) and add it in the id='' part of its source code."
},
{
title
:
"Sub-sub-section title"
,
url
:
"tpl/tinymce_templates/sub-sub-title.html"
,
description
:
"Enter the number in front (e.g. 2.7.7 Test) and add it in the id='' part of its source code."
}],
plugins
:
[
"advlist autolink lists link image charmap print preview hr anchor pagebreak"
,
"searchreplace wordcount visualblocks visualchars code"
,
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment