date support easy
This commit is contained in:
@@ -41,6 +41,14 @@ function convo_image(string,alt_text)
|
||||
end
|
||||
end
|
||||
|
||||
function convo_date(string)
|
||||
if string then
|
||||
apply_html("html/convo/header/date/start.html")
|
||||
print(string)
|
||||
apply_html("html/convo/header/date/end.html")
|
||||
end
|
||||
end
|
||||
|
||||
function convo_header_start()
|
||||
if not header then
|
||||
header = true
|
||||
@@ -137,13 +145,24 @@ while p ~= nil do
|
||||
user[current_user] = user[current_user] or {image = nil}
|
||||
if nlp and string.sub(text,nl+1,nl+1) == "i" then
|
||||
user[current_user].image = string.sub(text,nl+3,nlp-1)
|
||||
skip = 2
|
||||
skip = skip + 1
|
||||
nl = string.find(text,"\n",nl+1)
|
||||
nlp = string.find(text,"\n",nlp+1)
|
||||
end
|
||||
convo_image(user[current_user].image)
|
||||
|
||||
-- print name
|
||||
apply_html("html/convo/header/name/start.html")
|
||||
print(string.sub(text,p+1,np-1))
|
||||
apply_html("html/convo/header/name/end.html")
|
||||
|
||||
-- lets check for dates
|
||||
if nlp and string.sub(text,nl+1,nl+1) == "d" then
|
||||
convo_date(string.sub(text,nl+3,nlp-1))
|
||||
skip = skip + 1
|
||||
else
|
||||
convo_date("")
|
||||
end
|
||||
header = true
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user