Бескорыстный portal php mod. Модульное программирование на PHP или как написать маленький портал

  • 03.11.2019

Heya guys! Long time no see right? Well I"ve been busy for the , but let"s get this out of the way.

With Greenlight nearly coming to an end, let"s remind ourselves at how the great things it did for us. The only way people had to play mods was to go to some download page and install it manually on steam (great system btw, had it"s own folder on the steamapps). While that might sound easy for the most part, there where people who just didn"t knew you could actually install mods on steam, not to mention the steam pipe update which just broke everything.

And then came greenlight. Altough it was yes a door for many horrible games, controversies and the monthly steam drama fest, it did actually a lot of good. Many indie developers finally had a chance of putting their game onto what is the marketplace for any PC gamer. And mods benefited from that. People that didn"t even knew that mods existed, didn"t know how to install them or just didn"t knew how to fix a broken mod finally had a chance to play more of their favorite games. The influx of people mods got after this was HUGE, many youtubers making let"s plays of mods and a easy way to finally play them. There was even the case of PS: Mel that won a award at the Games Awards 2015.

A lot of mods benefited from it too. Without requiring the base game installed, people didn"t have to worry about any errors since valve helped make the mod being considered an actual game (for steam), allowing things such as workshop implementation and achievements.

So, with the end of greenlight, what this means for us?

Steam Direct is the all new system, which will let you put any game on steam for $100 and Valve"s approval. The $100 fee is nothing after all the work you and your team could have put on your mod, and the fee can be split up anyway. But it isn"t about the fee, the new system will actually mean a better gateway for new games and mods.

With a ton of great mods coming up however, you guys will have to find a new source for new mods. This collection won"t be updated anymore since mods won"t be getting on greenlight anymore. I do have a few websites you guys can check though

As far as I can remember the longest running Portal 1 & 2 community. Not only they have the most talented people, they also have all the people from the community. Not to mention the HUGE database of maps for both games on the series, the best source to download single maps all around. And have a great time too! They"re great people.

http://www.moddb.com/ - not only for the portal fan, moddb for me was the way to go for any mod of valve games. They don"t have any curation, but you can freely explore all the mods in a large list, and with a few filters you already have a huge download list to make use of. Moddb also has a few mods that people didn"t even hear about, which I loved to discover and play them by myself. Did you know portal has a chinese mod that let"s you use a phone? It"s great btw.

Well guys I guess that it. I"ll be seeing ya all around, but don"t think this means anything to the portal community. In fact, this won"t change pretty much anything! People will keep making mods and you guys will keep enjoying them. Just through a better method! See ya around,

EDIT: In case you wanna talk with the people of the thinking with portals forum, also check their discord.

Manual Install Instructions for SMF 1.0 RC1 1.0 RC2 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.23 1.1 Beta 3 Public 1.1 RC1 1.1 RC2 1.1 RC3 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.20 1.1.21 2.0 Beta 3 Public 2.0 Beta 3.1 Public 2.0 Beta 4 2.0 RC1 2.0 RC1-1 2.0 RC1.2 2.0 RC2 2.0 RC3 2.0 RC4 2.0 RC4 Security Patch 2.0 RC5 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.1 Beta 1 2.1 Beta 2 2.1 Beta 3 2.1 RC1 2.1 RC2

Description:

PortaMx v1.54 with a full featured Category / Article management
and Search Engine Friendly url"s (SEF) option and ECL option for SMF 2

PortaMx have many features like a Category and Articles Management and a option for Search Engine Friendly url"s. We use the SMF Integrations hooks extensive, so we need over 50% less changes on the SMF files. All basic files like the function for the Integration, caching and the SEF module (if enabled) are loaded automatically on SMF startup. All the additional Menus and functions also created with SMF hooks.

Because we continue the PortaMx philosophy to make the portal better and faster, we use extensive caching for all the new features. So it"s recommended, to enable the caching in SMF. Of course works all without caching, but not so fast.

The new Category / Article system is high configurable in all options like access inherit and visualization. Follow setup options we have:

  • The first Article is shown and all other Articles in the Category are linked in a sidebar.
  • All Articles shown in one page with paginating.
  • Inherit the access right from a Category to the Articles in it, so it"s easy to handle the rights (simple give the articles no rights). This suppressed also, that the Article itself can be requested.
  • Categories and Articles can be used as static elements on the Front page (Category / Article blocks).
  • Both can requested in the same way as a Single page request (cat=category-name, art=article-name).
We have expanded the overview screen (Blocks, Articles and Categories Manager) with new settings elements, they works in a Pop up window. With this it"s easy and fast to change the most important settings, like title, position, access and more. You can update a single Block or all Blocks in the Panel.
Also we expand and redesign the dynamic visibility option, specially the customer actions. These have now logical AND and OR functionality, can handle any request type and also sub actions like action=pm;sa=send. For this we will create a separate documentation.

Many users asked us, to add Search Engine Friendly url"s to the Portal and so we do that in this release. The SEF module that we created is based on SimpleSEF, but completely rewritten. We create easy and "speeking" url"s (without comma) in the format, which is proposed by Google.
Of course we have implemented all the Url"s they used for the Portal like Single pages, Categories and Articles. The SEF module have various settings, but normaly you can use the default settings without any change. Furthermore we also can convert url"s, they created by SimpleSEF, like board_## and topic_##.

Finally we give the Portal his own Right Management.
With this you can give any SMF group the rights to create, edit and delete own Articles, a group to moderate Articles and a group to moderate the Blocks in enabled Panels. At least you can give a SMF group Portal Administrator rights. This group have full access to ALL Portal functions (except update), but NO access to any SMF Administrator functions. All these function are linked in the users Profile menu.

PortaMx Administration Center

PortaMx Language Manager

BIB technology sample - free positioned blocks

BIB technology sample - YUI blocks with caching

Не сильно ошибусь, если скажу, что каждый сисадмин настраивал веб-сервер. Это мог быть IIS или Apache - в общем не важно. Развертывание всего этого добра на Windows или Linux довольно шаблонная задача, не вызывающая трудностей. А если даже таковые возникают, то способы решения не трудно найти в интернете.

Сегодня я хочу рассказать об одном частном случае, который случается в корпоративной сети, где все компьютеры и пользователи входят в домен Active Directory. Мы будем делать корпоративный web портал на каком-нибудь простеньком движке типа joomla. На портале будут размещаться различные новости, опросы, формы обратной связи, форумы и пр. Одна из основных фишек такого портала заключается в том, что все пользователи должны автоматически аутентифицироваться при входе на портал, а не регистрироваться/логиниться в ручную. Таким образом, любые действия на портале будут автоматически осуществляться от имени этого доменного пользователя. Эта функция как раз и называется SSO (Single Sing On) Подробнее см в wiki .

SSO будет работать если:

  • Движок портала (в нашем случае Joomla) умеет аутентифицировать пользователей по LDAP
  • Веб-сервер передает обработчику PHP имя пользователя, который открыл портал
  • Пользователь должен аутентифицироваться на уровне веб-сервера, однако, веб-сервер должен где-то проверять валидность пользователя, отсюда вытекает следующий пункт
  • Операционная система интегрирована в Active Directory

Ровно на этом месте встает вопрос, на каком web-сервере делать портал? Какую ОС взять за основу: Linux или Windows?

Рассмотрим варианты:

  1. ОС Windows, веб-сервер IIS. На первый взгляд кажется самым очевидным вариантом. Интеграция с AD на уровне операционки уже есть. php и MySQL поставить труда не составит. Однако, IIS будет нормально работать только на Windows Server, который стоит приличных денег. Если же взять какой-нибудь Windows 7, то IIS в нем имеет серьезное ограничение по количеству одновременных сессий и по факту связка Windows 7 + IIS не годится.
  2. ОС Linux, веб-сервер Apache. Основные преимущества - бесплатность и скорость работы. Основная трудность - вогнать Linux машину в домен Active Directory и правильно настроить Apache.
  3. ОС Windows 7, веб-сервер Apache. Относительно не дорого, подойдет тем, кто с Linux «на вы», интеграция с AD уже есть, потребуется небольшая настройка веб-сервера под наши задачи.

К своему удивлению, по п.2 и п.3 я не нашел в интернете полного мануала как сделать всё «от и до». В этом обзоре я остановлюсь на 3м варианте и попробую рассказать как это делается. И так, поехали…

Нам понадобится комп или виртуалка с любой виндой: XP, 7, 8 - подойдет что угодно. Этот комп должен входить в состав домена Active Directory.

Следующим шагом нам нужно установить Apache, PHP, MySQL на наш комп. Устанавливать эти компоненты можно по отдельности, скачивая windows-сборки этих программ, но я бы рекомендовал скачать один сборник WAMP (Windows Apache MySQL PHP). На момент написания обзора актуальная версия WAMP 2.5. Все компоненты установятся в несколько кликов. Т.к. это сборник компилируется разработчиками компиляторами MS, то предварительно на вашем компе должен быть установлен пакет Microsoft Visual C++ 2012 Redistributable Package той же разрядности что и WAMP. Если WAMP вы скачали 32-битный, а операционка у вас 64-бита, то VC2012 надо ставить обеих разрядностей. В целом, под наши задачи 64 бита это баловство и я бы рекомендовал взять 32 битную ОС и 32 битный WAMP.

Очень рекомендую установить на комп какой-нибудь нормальный текстовый редактор для правки конфигурационных файлов WAMP сервера. Например, bred . Встроенный Блокнот Windows не распознает переносы строк с Linux-like текстовых файлов.

WAMP обычно устанавливается в каталог C:wamp. В процессе установки нас попросят указать браузер по умолчанию. Я так и не понял какой именно браузер они спрашивают: файловый или интернет, я указал iexplore по адресу С:Program FilesInternet Exploreriexplore.exe. После установки в трее появится иконка в виде буквы W. Цвет значка обозначает статус работы: зеленый - все работает, оранжевый - запускается или останавливается, красный - не работает.

Клик левой кнопки мыши по значку открывает основное меню WAMPа.

По умолчанию, свежеустановленный веб-сервер будет открываться только с того компьютера, где он установлен по адресу http://localhost (верхний пункт меню) Если туда зайти, то мы увидим стартовую страницу, где будет расписано какие расширения установлены, можно быстренько глянуть phpinfo и пр:

Т.к. проект WAMP постоянно развивается, но не лишним будет песоздать все относительные ссылки, путь которых от версии к версии меняется. Делает это одним кликом, нужно просто кликнуть мышой по номеру версии в меню ApacheVersionx.x.x, где x.x.x это версия Апача:

Если этого не сделать, то некоторые нужные нам PHP-модули могут не загружаться, о чем будет много записей в логах:

Затем, нам нужно прикрутить к Apache модуль sspi той же разрядности, что и WAMP. .

В архиве вы найдете 2 папки, их нужно скопировать с заменой в каталог C:wampbinapacheapachex.x.x

После этого с помощью текстового редактора открываем конфиг апача из каталога c:wampbinapacheapachex.x.x confhttpd.conf

Примерно в начале конфига будет раздел, где прописаны все загружаемые модули. Дописываем туда модуль sspi (LoadModule authnz_sspi_module modules/mod_authnz_sspi.so) и проверяем, что модули authn_core_module и authz_core_module не закомментированы символом #: