Skip to content
Snippets Groups Projects
Commit 269875be authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add FileURL text.dat string, used when displaying file info

This is an optional (default: blank) string that can be used to display a
file's URL(s) (e.g. FTP and/or Web URLs, using @-codes) when viewing extended
file information. I currently have this string output before the file
description.

The idea is that a sysop could set this string (e.g in their ctrl/text.ini)
instead of or in-addition-to their text/menu/download.msg file and then the
file URL(s) would be more readily displayed (not just went prompting for a
download protocol to send said file).
parent 0dde9df8
No related branches found
No related tags found
No related merge requests found
Pipeline #7673 passed
...@@ -1109,3 +1109,4 @@ ...@@ -1109,3 +1109,4 @@
"paging node %u for private chat" 922 NodeActivityPagingNode "paging node %u for private chat" 922 NodeActivityPagingNode
"retrieving file from device #%d" 923 NodeActivityRetrievingFile "retrieving file from device #%d" 923 NodeActivityRetrievingFile
"performing custom activity" 924 NodeActivityCustom "performing custom activity" 924 NodeActivityCustom
"" 925 FileURL
...@@ -60,6 +60,7 @@ void sbbs_t::showfileinfo(file_t* f, bool show_extdesc) ...@@ -60,6 +60,7 @@ void sbbs_t::showfileinfo(file_t* f, bool show_extdesc)
if(f->file_idx.hash.flags & SMB_HASH_SHA1) if(f->file_idx.hash.flags & SMB_HASH_SHA1)
bprintf(P_TRUNCATE, text[FiChecksum], "SHA-1", SHA1_hex(tmp, f->file_idx.hash.data.sha1)); bprintf(P_TRUNCATE, text[FiChecksum], "SHA-1", SHA1_hex(tmp, f->file_idx.hash.data.sha1));
} }
bputs(P_TRUNCATE, text[FileURL]);
if(f->desc && f->desc[0]) if(f->desc && f->desc[0])
bprintf(P_TRUNCATE, text[FiDescription],f->desc); bprintf(P_TRUNCATE, text[FiDescription],f->desc);
if(f->tags && f->tags[0]) if(f->tags && f->tags[0])
......
...@@ -941,6 +941,7 @@ enum text { ...@@ -941,6 +941,7 @@ enum text {
,NodeActivityPagingNode ,NodeActivityPagingNode
,NodeActivityRetrievingFile ,NodeActivityRetrievingFile
,NodeActivityCustom ,NodeActivityCustom
,FileURL
,TOTAL_TEXT ,TOTAL_TEXT
}; };
......
...@@ -1488,4 +1488,5 @@ const char * const text_defaults[TOTAL_TEXT]={ ...@@ -1488,4 +1488,5 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x70\x61\x67\x69\x6e\x67\x20\x6e\x6f\x64\x65\x20\x25\x75\x20\x66\x6f\x72\x20\x70\x72\x69\x76\x61\x74\x65\x20\x63\x68\x61\x74" // 922 NodeActivityPagingNode ,"\x70\x61\x67\x69\x6e\x67\x20\x6e\x6f\x64\x65\x20\x25\x75\x20\x66\x6f\x72\x20\x70\x72\x69\x76\x61\x74\x65\x20\x63\x68\x61\x74" // 922 NodeActivityPagingNode
,"\x72\x65\x74\x72\x69\x65\x76\x69\x6e\x67\x20\x66\x69\x6c\x65\x20\x66\x72\x6f\x6d\x20\x64\x65\x76\x69\x63\x65\x20\x23\x25\x64" // 923 NodeActivityRetrievingFile ,"\x72\x65\x74\x72\x69\x65\x76\x69\x6e\x67\x20\x66\x69\x6c\x65\x20\x66\x72\x6f\x6d\x20\x64\x65\x76\x69\x63\x65\x20\x23\x25\x64" // 923 NodeActivityRetrievingFile
,"\x70\x65\x72\x66\x6f\x72\x6d\x69\x6e\x67\x20\x63\x75\x73\x74\x6f\x6d\x20\x61\x63\x74\x69\x76\x69\x74\x79" // 924 NodeActivityCustom ,"\x70\x65\x72\x66\x6f\x72\x6d\x69\x6e\x67\x20\x63\x75\x73\x74\x6f\x6d\x20\x61\x63\x74\x69\x76\x69\x74\x79" // 924 NodeActivityCustom
,"" // 925 FileURL
}; };
...@@ -925,4 +925,5 @@ const char* const text_id[]={ ...@@ -925,4 +925,5 @@ const char* const text_id[]={
,"NodeActivityPagingNode" ,"NodeActivityPagingNode"
,"NodeActivityRetrievingFile" ,"NodeActivityRetrievingFile"
,"NodeActivityCustom" ,"NodeActivityCustom"
,"FileURL"
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment