Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke / Raven CMS CMS Wiki
Author Message
neralex
The Mouse Is Extension Of Arm


Joined: Aug 22, 2007
Posts: 1297
Location: Germany

PostPosted: Wed Sep 27, 2017 2:21 am Reply with quote

Here you can see the using of the both cropped image files. The magic-tags [featured_image] and [image_original] are creating <img>-tags, which can be placed in the 'Extended Text" editor-field where ever you want. If no image was uploaded, then the generic imag will be used.

Only registered users can see links on this board! Get registered or login! Only registered users can see links on this board! Get registered or login!

I have created a PHP class to load/indentify the both images, which can be used by theme-designers to add the images as design-elements outside of the editor-field.

For example:

php Code:
global $getimg;

$identid = $article['sid'];
$related = 'article';
$getimg->value($identid, $related);

/*
return values:
$getimg->img_id = id of the db-entry in the image db-table (primary key)
$getimg->identid = id of the related db-entry, in this case the stories-id (primary key)
$getimg->image_file = path to the original cropped file
$getimg->ogimage_file = path to the cropped file based on the open graph aspect ratio
*/

if ($getimg->img_id != '' && file_exists($getimg->ogimage_file)) {
$search = array('[featured_image]', '[image_original]');
$replace = array(
'<img src="' . $getimg->ogimage_file . '" alt="' . $article['title'] . '">',
'<img src="' . $getimg->image_file . '" alt="' . $article['title'] . '">'
);
$article['bodytext'] = str_replace($search, $replace, $article['bodytext']);
}


Edit: Options added incl. language definitions to the Theme-Settings. On this way, it can be set individually for each theme.

Only registered users can see links on this board! Get registered or login!


Last edited by neralex on Tue Oct 10, 2017 8:19 am; edited 1 time in total 
View user's profile Send private message
neralex
PostPosted: Fri Oct 06, 2017 10:44 am Reply with quote

Note: RavenCMS has a functionality to use different themes with different default-values for the frontend and backend. <3

Hint: I added a function to reset the theme settings with default-values, based on the config-class and using of jQuery and bootstrap modal dialog. This function removes all settings of the used theme from the database and recreate it based on the default-values with the functionality/difference for frontend- and backend-themes.

Only registered users can see links on this board! Get registered or login!

RavensScripts
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Fri Oct 06, 2017 10:52 am Reply with quote

Looks good!
 
View user's profile Send private message
papamike
Theme Guru


Joined: Jan 11, 2006
Posts: 155
Location: Southern Influence

PostPosted: Mon Oct 23, 2017 1:20 pm Reply with quote

Hi guys, I wasn't aware that there was work going on with themes? I went in depth trying to design a responsive theme but found that it is near impossible. I never did find a way to do it without doing away with the blocks and messages. It could be designed by using news stories only. Just saying ...
 
View user's profile Send private message
neralex
PostPosted: Mon Oct 23, 2017 2:04 pm Reply with quote

Responsive Design with RN25x is not really possible but not impossible. It needs a complete rewrite of the whole CMS. You need a framework like Bootstrap, which is providing an design-grid. But the big bunch of work was the reason to create a new CMS like RavenCMS, which contains all what do you need for a responsive layout.

Here you can find two examples of RN25x, which are rewritten and prepared for bootstrap 3.3.7. But as I said, it needs a huge replacement of all core-files and after that, all older themes will not more work.
Only registered users can see links on this board! Get registered or login! Only registered users can see links on this board! Get registered or login!

With the new theme-system in RavenCMS you have all the possibilities to build themes with different frameworks. Spasticdonkey has made soooo many great changes on RavenCMS, which will help all to convert old themes to the new the system. But before I can give more details about it, I have to recode some older core-modules and after that we have to write it all down in a big wiki.

Keep an eye on Only registered users can see links on this board! Get registered or login! - this is the current used framework for RavenCMS. But since some weeks the new version 4.x is coming and I want to prepare RavenCMS also for the new version. The Docs are pretty good and you should learn it easy step by step. I love this framework - it makes so many things easier and you have much more time for the design thing.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke / Raven CMS CMS Wiki

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©