TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,061
  • Total Topics: 21,338
  • Online today: 234
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 139
  • Total: 139

Displaying posts on front page disregarding permissions.

Started by mr juntao, April 18, 2008, 02:46:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr juntao

SMF version: 1.1.4
TP version: 1.05

Firstly I did a search for this but found the only topics were about doing it the opposite away so . . . (I aplogise if this is the wrong place to post)

What I am trying to do is make forum posts visible on the frontpage to everyone from the areas I pick.

For example right now I have 5 selected but as the forums are restricted to certain groups normal members cannot see them. I need everyone to be able to see them but when they click the link access will obviously not be given. Its basically to show the content they can be accesing and encourage them to sign up. I cant show the site as its local at the moment.

Even if you can point me in the direction of the right file where the check for permissions on the front page when rendering the forum posts is made.

Thanks.

G6Cad

Uncheck the catbox on the tp fromtpage option ( allow guests to see the news )

mr juntao

QuoteAllow guests to see news from the news board - even if guest are not allowed to see the board?

Is now set to no, however although members with access to the forum can see it, normal members and members of other groups cannot, thanks for the quick reply :)

JPDeni

I'm not completely sure, but it looks like the function that displays the posts is in /Sources/TPortal.php and is called TP_boardNews. The line that determines who can see the posts is in the first database query in the function:


AND $user_info[query_see_board]


I would suggest that you copy the code from the function, paste it into a center (or front page) php block and remove the line above. You'll need to define the boards you want to use in the $board variable, as well as defining the other variables. They're right at the beginning of the function.

I would hesitate to actually alter the TPortal.php file, because you may regret it later on. :) At the very least, you should copy the query, paste it back in, remove the line from the code and then comment out the unaltered query. That way, if you should want it later on, it'll still be there.

Also, I haven't tested this, so please don't do anything that you can't easily reverse until you know for sure that it works!!

mr juntao

#4
Arigato Gozaimasu ^^;

It worked perfect, the function is now located in TPmodules in 1.05 but thanks to you giving me the name of the function I found it in no time, well thats one less headache today!

I also just cut the line and commented it out above stating where it was taken from, so if down the line something does mess up because of it, it's easy to revert back :)

Thanks again.


JPDeni

Darn! I thought I was looking at 1.05. Glad you found it. :)

I would say "You're welcome", but my Japanese is very limited. I only know what I learned from Shogun.

mr juntao

I'm still learning my Japanese but it should be 'Do itashi mashite' :)

I picked up most of my Japanese from anime but now fully into learning it :) So hard to remember the kana never mind kanji!

Anyhooo off to sort out the site, Im sure there will many more questions I will have as it seems they want it heavily customising :( Currently trying to get a seamless calendar integration with tinyportal, smf and then individually managed caledars for boards and slowly coming to the conclusion it will have to be done using an external application and blocks!

Thanks again ^^

This website is proudly hosted on Crocweb Cloud Website Hosting.