3

I'll add more

  1. How do I make a site-wide announcement. A post that is stickied on the front page of my phuks site? I went to the admin page but didn't see any option either. Where do I do this?

  2. I've Allowed users to flair their own posts but they never see the flair post link. So it's me who always has to flair the post. Is it just my site or this feature isn't working for now i.e. users can't flair their post yet but admins have to flair the post?

  3. Do pics always have to be direct links. E.g. https://imgur.com/gallery/PWBGDzv doesn't work but https://imgur.com/gallery/PWBGDzv.jpg works.

  4. My site is for a small community so it'll take usesr to achieve the Scores years to achieve the badges. How and where do I make these changes? I noticed the scores in the badges.py file and tried lowering the scores but it doesn't seem to work :-/

    PS: I ran npm run build && killall -HUP gunicorn

  5. I've tried had to remove this rectangled area (see pic) in the submit and some other pages but I just can't get it work. I looked at the CSS and layout.html file but couldn't find it > https://i.imgur.com/K2rnnfc.png. Any pointers here would really help.

  6. Nothing happens when clicking Report link isn't working.

  7. I'm in Ubuntu and running the following command doesn't work to set a sub as default. I run them as app in the throat/scripts folder.

python3 defaults.py --add SOMESUB

Other alternatives I tried

python3 defaults.py -add SOMESUB

python defaults.py --add SOMESUB

Here's the error.

Traceback (most recent call last):
  File "defaults.py", line 60, in <module>
    addSub(args.subname)
  File "defaults.py", line 34, in addSub
    isSub, sid = getSid(subname)
  File "defaults.py", line 26, in getSid
    sub = Sub.get(fn.Lower(Sub.name) == subname.lower())
NameError: name 'fn' is not defined
  1. For adding someone as admin, I get the following error.

Script I run python3 admins.py --add USERNAME

Error

Traceback (most recent call last):
  File "admins.py", line 27, in <module>
    user = User.get(fn.Lower(User.name) == args.add.lower())
NameError: name 'fn' is not defined
I'll add more 1. How do I make a site-wide announcement. A post that is stickied on the front page of my phuks site? I went to the admin page but didn't see any option either. Where do I do this? 2. I've Allowed users to flair their own posts but they never see the **flair post** link. So it's me who always has to flair the post. Is it just my site or this feature isn't working for now i.e. users can't flair their post yet but admins have to flair the post? 3. Do pics always have to be direct links. E.g. https://imgur.com/gallery/PWBGDzv doesn't work but https://imgur.com/gallery/PWBGDzv.jpg works. 4. My site is for a small community so it'll take usesr to achieve the **Scores** years to achieve the badges. How and where do I make these changes? I noticed the scores in the **badges.py** file and tried lowering the scores but it doesn't seem to work :-/ PS: I ran npm run build && killall -HUP gunicorn 5. I've tried had to remove this rectangled area (see pic) in the submit and some other pages but I just can't get it work. I looked at the CSS and layout.html file but couldn't find it > https://i.imgur.com/K2rnnfc.png. Any pointers here would really help. 6. Nothing happens when clicking **Report** link isn't working. 7. I'm in Ubuntu and running the following command doesn't work to set a sub as default. I run them as app in the throat/scripts folder. ```python3 defaults.py --add SOMESUB``` Other alternatives I tried ```python3 defaults.py -add SOMESUB``` ```python defaults.py --add SOMESUB``` Here's the error. ``` Traceback (most recent call last): File "defaults.py", line 60, in <module> addSub(args.subname) File "defaults.py", line 34, in addSub isSub, sid = getSid(subname) File "defaults.py", line 26, in getSid sub = Sub.get(fn.Lower(Sub.name) == subname.lower()) NameError: name 'fn' is not defined ``` 8. For adding someone as admin, I get the following error. Script I run ``` python3 admins.py --add USERNAME``` Error ``` Traceback (most recent call last): File "admins.py", line 27, in <module> user = User.get(fn.Lower(User.name) == args.add.lower()) NameError: name 'fn' is not defined ```

5 comments

[–] pembo210 1 points (+1|-0) Edited

1- Announcements can only be made from an s/announcements sub. the subname is checked in the template - https://phab.phuks.co/source/throat/browse/master/app/html/sub/post.html$143

The js for the button - https://phab.phuks.co/source/throat/browse/master/app/static/js/Post.js$85

The backend, creating and deleting the announcement - https://phab.phuks.co/source/throat/browse/master/app/views/do.py$1300

2- idk

3- pics: the ending of the url ending with jpg/gif/... is what triggers the expadno for an embedded image - https://phab.phuks.co/source/throat/browse/master/app/html/sub/post.html$87 and https://phab.phuks.co/source/throat/browse/master/app/static/js/Expando.js$137

https://imgur.com/gallery/PWBGDzv doesn't work because it's a link to a gallery, phuks doesn't ping galleries or random links to see if it only has one image

4- Once the badge is assigned, the badge score is added to the user's score in the db, you'll have to manually edit those already assigned back down

  • that's the sidebar, it's part of the layout - https://phab.phuks.co/source/throat/browse/master/app/templates/createpost.html$2

  • The report button send messages to our chat window, making an admin interface is on the todo list already

  • the default.py and admin.py files won't work until you update them for postgres

  • you cant embed iframes anywhere

  • the only expandos that work in comments are direct images

[–] curious [OP] 0 points (+0|-0) Edited

Thanks so much for the answers @pembo210

1- Announcements can only be made from an s/announcements sub. the subname is checked in the template - https://phab.phuks.co/source/throat/browse/master/app/html/sub/post.html$143

So in layman terms, I make an announcements sub, create a post, sticky that post and the post will be stickied to the home page?

the default.py and admin.py files won't work until you update them for postgres

It would be great if you could please share some links where I can have a look at this? I could've sworn I ran one of the above correct commands (in the previous code base) and it worked - same host, same Ubuntu version.

that's the sidebar, it's part of the layout

So basically, nothing I do/tweak to remove it? Like remove it from say the tos, canary or say, some of the template pages. I noticed all these pages call the layout.html pages.

The report button send messages to our chat window, making an admin interface is on the todo list already

Which chat window? The one on this site? I never saw one on my site. Sorry but a bit confused here.

the only expandos that work in comments are direct images

Might not be on of your highest priority list but is it there in the roadmap? Users usually hate to have to go to another site just to view a pic/YouTube video - it's one of the reasons why FB posts with YouTube videos are hardly 'liked'.

Speaking of which, can I make a text post with multiple images in different rows (as inline images). Like when I click on the post the images are displayed/loaded and not that I have to click each of the abc.jpg link to view the image? I noticed that this markdown syntax doesn't work ![Alt text](/images/boo.svg "a title")

The rest of the answers, all understood loud and clear!